fix(consul): fix gRPC health checks and add API Gateway Consul registration
This commit is contained in:
@@ -418,6 +418,9 @@ func provideIdentityService() fx.Option {
|
||||
// Register health service
|
||||
healthServer := health.NewServer()
|
||||
grpc_health_v1.RegisterHealthServer(grpcServer, healthServer)
|
||||
// Set serving status for the default service (empty string) - this is what Consul checks
|
||||
healthServer.SetServingStatus("", grpc_health_v1.HealthCheckResponse_SERVING)
|
||||
// Also set for the specific service name
|
||||
healthServer.SetServingStatus("identity.v1.IdentityService", grpc_health_v1.HealthCheckResponse_SERVING)
|
||||
|
||||
// Register reflection for grpcurl
|
||||
|
||||
Reference in New Issue
Block a user