add needed files

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-09-12 23:24:32 +03:00
parent e265a6f83f
commit d797edb9a7
15 changed files with 2139 additions and 13 deletions

17
options.go Normal file
View File

@@ -0,0 +1,17 @@
package drpc
import (
"github.com/unistack-org/micro/v3/server"
)
type (
maxMsgSizeKey struct{}
)
//
// MaxMsgSize set the maximum message in bytes the server can receive and
// send. Default maximum message size is 4 MB.
//
func MaxMsgSize(s int) server.Option {
return server.SetOption(maxMsgSizeKey{}, s)
}