diff options
author | James Liu <jliu@gitlab.com> | 2023-12-18 07:03:41 +0300 |
---|---|---|
committer | James Liu <jliu@gitlab.com> | 2023-12-19 02:33:45 +0300 |
commit | 8fc4f9f3435eca1fb5cfd6abd7acd2b60b709c9c (patch) | |
tree | fa87c1eb0d8b92e70f6e6fed4175cf9b6c25f2d0 | |
parent | 95dd9a8271285cf4a7aa4c42ca82319180643f2e (diff) |
praefect: Enable grpcui compatibility
Registers the gRPC reflection service with the Praefect server to enable
tools like grpcui to detect the server's endpoints. With this change, it
is possible to test Praefect's endpoints locally with the following:
grpcui -unix -plaintext <path/to/praefect.socket>
-rw-r--r-- | internal/praefect/server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/praefect/server.go b/internal/praefect/server.go index 4792e4655..54cbee079 100644 --- a/internal/praefect/server.go +++ b/internal/praefect/server.go @@ -38,6 +38,7 @@ import ( "google.golang.org/grpc/health" healthpb "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/reflection" ) // NewBackchannelServerFactory returns a ServerFactory that serves the RefTransactionServer on the backchannel @@ -223,7 +224,7 @@ func registerServices( gitalypb.RegisterPraefectInfoServiceServer(srv, info.NewServer(conf, logger, rs, assignmentStore, conns, primaryGetter)) gitalypb.RegisterRefTransactionServer(srv, transaction.NewServer(tm)) healthpb.RegisterHealthServer(srv, health.NewServer()) - + reflection.Register(srv) grpcprometheus.Register(srv) } |