Skip to content

Commit

Permalink
Use reflection in the base server
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Farries authored and roboquat committed May 17, 2022
1 parent d336cf8 commit 77ce184
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/common-go/baseserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/health/grpc_health_v1"
"google.golang.org/grpc/reflection"
)

func New(name string, opts ...Option) (*Server, error) {
Expand Down Expand Up @@ -291,6 +292,8 @@ func (s *Server) initializeGRPC() error {

s.grpc = grpc.NewServer(opts...)

reflection.Register(s.grpc)

// Register health service by default
grpc_health_v1.RegisterHealthServer(s.grpc, s.options.grpcHealthCheck)

Expand Down

0 comments on commit 77ce184

Please sign in to comment.