From 7e23bbe48cb291e7aa03c37fab55635457d15517 Mon Sep 17 00:00:00 2001 From: Ryan Campbell <89273172+bigtallcampbell@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:48:06 -0500 Subject: [PATCH] Add health check service (#13) * adding health check service * updating to grpc health check --- src/Program.cs | 1 + test/debugClient/Program.cs | 1 + test/integrationTests/TestSharedContext.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/Program.cs b/src/Program.cs index fee5333..a8be3d5 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -33,6 +33,7 @@ public static void Main(string[] args) { app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapGrpcService(); + endpoints.MapGrpcHealthChecksService(); endpoints.MapGet("/", async context => { await context.Response.WriteAsync("Communication with gRPC endpoints must be made through a gRPC client. To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909"); }); diff --git a/test/debugClient/Program.cs b/test/debugClient/Program.cs index bb8c741..06aac21 100644 --- a/test/debugClient/Program.cs +++ b/test/debugClient/Program.cs @@ -32,6 +32,7 @@ public static void Main(string[] args) { app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapGrpcService(); + endpoints.MapGrpcHealthChecksService(); endpoints.MapGet("/", async context => { await context.Response.WriteAsync("Communication with gRPC endpoints must be made through a gRPC client. To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909"); }); diff --git a/test/integrationTests/TestSharedContext.cs b/test/integrationTests/TestSharedContext.cs index b1c2a9a..74a2cad 100644 --- a/test/integrationTests/TestSharedContext.cs +++ b/test/integrationTests/TestSharedContext.cs @@ -44,6 +44,7 @@ public TestSharedContext() { _grpcHost.UseRouting(); _grpcHost.UseEndpoints(endpoints => { endpoints.MapGrpcService(); + endpoints.MapGrpcHealthChecksService(); endpoints.MapGet("/", async context => { await context.Response.WriteAsync("Communication with gRPC endpoints must be made through a gRPC client. To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909"); });