Skip to content

Commit

Permalink
[infra-proxy-service] add service call before reflection
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Singh <[email protected]>
  • Loading branch information
Vivek Singh committed Feb 17, 2020
1 parent bf87308 commit 9c11c0a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/automate-gateway/gateway/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ func (s *Server) RegisterGRPCServices(grpcServer *grpc.Server) error {
)
pb_data_lifecycle.RegisterDataLifecycleServer(grpcServer, dataLifecycleServer)

infraProxyClient, err := clients.InfraProxyClient()
if err != nil {
return errors.Wrap(err, "create client for infra proxy service")
}
pb_infra_proxy.RegisterInfraProxyServer(grpcServer, handler_infra_proxy.NewInfraProxyHandler(infraProxyClient))

// Reflection to be able to make grpcurl calls
reflection.Register(grpcServer)

Expand All @@ -326,12 +332,6 @@ func (s *Server) RegisterGRPCServices(grpcServer *grpc.Server) error {
}
pb_data_feed.RegisterDatafeedServiceServer(grpcServer, handler.NewDatafeedHandler(datafeedClient))

infraProxyClient, err := clients.InfraProxyClient()
if err != nil {
return errors.Wrap(err, "create client for infra proxy service")
}
pb_infra_proxy.RegisterInfraProxyServer(grpcServer, handler_infra_proxy.NewInfraProxyHandler(infraProxyClient))

grpc_prometheus.Register(grpcServer)

return nil
Expand Down

0 comments on commit 9c11c0a

Please sign in to comment.