Merge pull request #41 from mdiluz/add-reflection

Add gRPC reflection to the server
This commit is contained in:
Marc Di Luzio 2020-07-26 22:53:59 +01:00 committed by GitHub
commit bb50fae00b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,7 @@ import (
"github.com/mdiluz/rove/proto/roveapi" "github.com/mdiluz/rove/proto/roveapi"
"github.com/robfig/cron" "github.com/robfig/cron"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/reflection"
) )
const ( const (
@ -105,6 +106,7 @@ func (s *Server) Initialise(fillWorld bool) (err error) {
} }
s.grpcServ = grpc.NewServer() s.grpcServ = grpc.NewServer()
roveapi.RegisterRoveServer(s.grpcServ, s) roveapi.RegisterRoveServer(s.grpcServ, s)
reflection.Register(s.grpcServ)
return nil return nil
} }