server: allow configuration default send/recv message sizes

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2018-03-23 14:16:52 -07:00
parent 3e8e9d3ed7
commit acc71293c5
6 changed files with 44 additions and 5 deletions

View File

@@ -67,6 +67,8 @@ func New(ctx context.Context, config *Config) (*Server, error) {
return nil, err
}
rpc := grpc.NewServer(
grpc.MaxRecvMsgSize(config.GRPC.MaxRecvMsgSize),
grpc.MaxSendMsgSize(config.GRPC.MaxSendMsgSize),
grpc.UnaryInterceptor(grpc_prometheus.UnaryServerInterceptor),
grpc.StreamInterceptor(grpc_prometheus.StreamServerInterceptor),
)