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

Commit efb3e0c

Browse files
honnixchanadian
authored andcommitted
add server reflection (#19)
1 parent de2f73e commit efb3e0c

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

Gopkg.lock

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/entrypoints/serve.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/lyft/flytestdlib/logger"
1212
"github.com/spf13/cobra"
1313
"google.golang.org/grpc"
14+
"google.golang.org/grpc/reflection"
1415
)
1516

1617
var serveCmd = &cobra.Command{
@@ -53,6 +54,7 @@ func serveInsecure(ctx context.Context, cfg *config.Config) error {
5354
func newGRPCServer(_ context.Context) *grpc.Server {
5455
grpcServer := grpc.NewServer()
5556
datacatalog.RegisterDataCatalogServer(grpcServer, datacatalogservice.NewDataCatalogService())
57+
reflection.Register(grpcServer)
5658
return grpcServer
5759
}
5860

cmd/entrypoints/serve_dummy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/lyft/flytestdlib/logger"
1111
"github.com/spf13/cobra"
1212
"google.golang.org/grpc"
13+
"google.golang.org/grpc/reflection"
1314
)
1415

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

0 commit comments

Comments
 (0)