Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
add server reflection (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
honnix authored and chanadian committed Nov 20, 2019
1 parent 65025b4 commit b365a10
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions cmd/entrypoints/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/lyft/flytestdlib/logger"
"github.com/spf13/cobra"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)

var serveCmd = &cobra.Command{
Expand Down Expand Up @@ -53,6 +54,7 @@ func serveInsecure(ctx context.Context, cfg *config.Config) error {
func newGRPCServer(_ context.Context) *grpc.Server {
grpcServer := grpc.NewServer()
datacatalog.RegisterDataCatalogServer(grpcServer, datacatalogservice.NewDataCatalogService())
reflection.Register(grpcServer)
return grpcServer
}

Expand Down
2 changes: 2 additions & 0 deletions cmd/entrypoints/serve_dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/lyft/flytestdlib/logger"
"github.com/spf13/cobra"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)

var serveDummyCmd = &cobra.Command{
Expand Down Expand Up @@ -51,5 +52,6 @@ func serveDummy(ctx context.Context, cfg *config.Config) error {
func newGRPCDummyServer(_ context.Context) *grpc.Server {
grpcServer := grpc.NewServer()
datacatalog.RegisterDataCatalogServer(grpcServer, &datacatalogservice.DataCatalogService{})
reflection.Register(grpcServer)
return grpcServer
}

0 comments on commit b365a10

Please sign in to comment.