2021-09-12 23:24:32 +03:00
|
|
|
package drpc
|
|
|
|
|
|
|
|
import (
|
2021-10-27 18:20:32 +03:00
|
|
|
"go.unistack.org/micro/v3/server"
|
2021-09-12 23:24:32 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|