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

add server reflection #19

Merged
merged 1 commit into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}