micro-server-drpc/options.go
Vasiliy Tolstov d797edb9a7 add needed files
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-12 23:24:41 +03:00

18 lines
317 B
Go

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)
}