Add gRPC reflection to the server
This commit is contained in:
parent
49ffa18f23
commit
a321e5d72f
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue