From 4f1d2f056f37492c247315259a915db7ae1d0059 Mon Sep 17 00:00:00 2001 From: opensite Date: Mon, 26 Apr 2021 22:48:39 +0800 Subject: [PATCH] feat:add grpc reflection register (#865) --- transport/grpc/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transport/grpc/server.go b/transport/grpc/server.go index ccc1f1583..a524bc4c0 100644 --- a/transport/grpc/server.go +++ b/transport/grpc/server.go @@ -14,6 +14,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/health" healthpb "google.golang.org/grpc/health/grpc_health_v1" + "google.golang.org/grpc/reflection" ) const loggerName = "transport/grpc" @@ -104,6 +105,8 @@ func NewServer(opts ...ServerOption) *Server { srv.Server = grpc.NewServer(grpcOpts...) // grpc health register healthpb.RegisterHealthServer(srv.Server, srv.health) + // reflection register + reflection.Register(srv.Server) return srv }