Skip to content

Commit

Permalink
feat(server): stub grpc health check service
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig authored and JeancarloBarrios committed Sep 28, 2024
1 parent 3d17437 commit 6f78da9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"net"

"google.golang.org/grpc"
"google.golang.org/grpc/health"
"google.golang.org/grpc/health/grpc_health_v1"

"cosmossdk.io/log"

Expand All @@ -22,6 +24,8 @@ import (
func StartGRPCServer(clientCtx client.Context, app types.Application, address string) (*grpc.Server, error) {
grpcSrv := grpc.NewServer()
app.RegisterGRPCServer(grpcSrv)
// Respond to health checks.
grpc_health_v1.RegisterHealthServer(grpcSrv, health.NewServer())
// reflection allows consumers to build dynamic clients that can write
// to any cosmos-sdk application without relying on application packages at compile time
err := reflection.Register(grpcSrv, reflection.Config{
Expand Down

0 comments on commit 6f78da9

Please sign in to comment.