gaoxinge commented on a change in pull request #1266:
URL: https://github.com/apache/dubbo-go/pull/1266#discussion_r657116126
##########
File path: protocol/grpc/internal/server.go
##########
@@ -40,25 +44,38 @@ func (s *server) SayHello(ctx context.Context, in
*HelloRequest) (*HelloReply, e
return &HelloReply{Message: "Hello " + in.GetName()}, nil
}
-// InitGrpcServer creates global gRPC server.
-func InitGrpcServer() {
- port := ":30000"
+func (s *server) Reference() string {
+ return "GrpcGreeterImpl"
+}
+
+type Server struct {
+ listener net.Listener
+ server *grpc.Server
+}
- lis, err := net.Listen("tcp", port)
+func NewServer() (*Server, error) {
+ listener, err := net.Listen("tcp", ":30000")
Review comment:
ok, I add a address as config in test grpc server
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]