fix(consul): fix gRPC health checks and add API Gateway Consul registration

This commit is contained in:
2025-11-06 22:04:55 +01:00
parent 04022b835e
commit dbe29bfb82
8 changed files with 610 additions and 66 deletions

View File

@@ -324,6 +324,9 @@ func provideAuditService() 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("audit.v1.AuditService", grpc_health_v1.HealthCheckResponse_SERVING)
// Register reflection for grpcurl