|
|
@ -54,7 +54,13 @@ func (s *groupServer) Run() {
|
|
|
|
log.NewInfo("", "listen network success, ", registerAddress, listener)
|
|
|
|
log.NewInfo("", "listen network success, ", registerAddress, listener)
|
|
|
|
defer listener.Close()
|
|
|
|
defer listener.Close()
|
|
|
|
//grpc server
|
|
|
|
//grpc server
|
|
|
|
srv := grpc.NewServer()
|
|
|
|
recvSize := 1024 * 1024 * 30
|
|
|
|
|
|
|
|
sendSize := 1024 * 1024 * 30
|
|
|
|
|
|
|
|
var options = []grpc.ServerOption{
|
|
|
|
|
|
|
|
grpc.MaxRecvMsgSize(recvSize),
|
|
|
|
|
|
|
|
grpc.MaxSendMsgSize(sendSize),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
srv := grpc.NewServer(options...)
|
|
|
|
defer srv.GracefulStop()
|
|
|
|
defer srv.GracefulStop()
|
|
|
|
//Service registers with etcd
|
|
|
|
//Service registers with etcd
|
|
|
|
pbGroup.RegisterGroupServer(srv, s)
|
|
|
|
pbGroup.RegisterGroupServer(srv, s)
|
|
|
|