diff --git a/cmd/server/main.go b/cmd/server/main.go index fa8d2ea..0ab0cba 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -14,6 +14,8 @@ import ( "github.com/jackc/pgx/v5/pgxpool" "github.com/rs/zerolog/log" "google.golang.org/grpc" + "google.golang.org/grpc/health" + healthpb "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/reflection" "github.com/metadata-agregator/internal/config" @@ -67,6 +69,7 @@ func main() { ), ) metadatav1.RegisterMetadataServiceServer(grpcServer, server.NewMetadataServer(services)) + healthpb.RegisterHealthServer(grpcServer, health.NewServer()) reflection.Register(grpcServer) srvMetrics.InitializeMetrics(grpcServer) diff --git a/devenv.nix b/devenv.nix index 0bc8ced..25c49a2 100644 --- a/devenv.nix +++ b/devenv.nix @@ -11,7 +11,7 @@ let pname = "metadata-agregator"; version = "0.1.0"; src = ./.; - vendorHash = "sha256-qNNFHRKqGoo/GveSl9+Bm+DkTKDoSQeGtG8p1edmCJk="; + vendorHash = "sha256-iRG3hW7lQW1c9vIfpDs110AHeoq7N3KjyvJN9K0Sjos="; subPackages = [ "cmd/server" ]; }; in