Enable gRPC reflection to support gRPCurl and gRPCui

This commit is contained in:
Peter 2021-01-20 18:43:28 +01:00
parent af0a7a2375
commit 03f3ae4173
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9

View file

@ -9,6 +9,7 @@ import (
"gitlab.com/inetmock/inetmock/pkg/logging" "gitlab.com/inetmock/inetmock/pkg/logging"
"go.uber.org/zap" "go.uber.org/zap"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/reflection"
) )
type INetMockAPI interface { type INetMockAPI interface {
@ -57,6 +58,8 @@ func (i *inetmockAPI) StartServer() (err error) {
eventStream: i.app.EventStream(), eventStream: i.app.EventStream(),
}) })
reflection.Register(i.server)
go i.startServerAsync(lis) go i.startServerAsync(lis)
return return
} }