Skip to content

Commit

Permalink
Add health check service (#13)
Browse files Browse the repository at this point in the history
* adding health check service

* updating to grpc health check
  • Loading branch information
bigtallcampbell authored Jul 31, 2024
1 parent 5086fde commit 7e23bbe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static void Main(string[] args) {
app.UseRouting();
app.UseEndpoints(endpoints => {
endpoints.MapGrpcService<Microsoft.Azure.SpaceFx.Core.Services.MessageReceiver>();
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");
});
Expand Down
1 change: 1 addition & 0 deletions test/debugClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public static void Main(string[] args) {
app.UseRouting();
app.UseEndpoints(endpoints => {
endpoints.MapGrpcService<Core.Services.MessageReceiver>();
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");
});
Expand Down
1 change: 1 addition & 0 deletions test/integrationTests/TestSharedContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public TestSharedContext() {
_grpcHost.UseRouting();
_grpcHost.UseEndpoints(endpoints => {
endpoints.MapGrpcService<Core.Services.MessageReceiver>();
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");
});
Expand Down

0 comments on commit 7e23bbe

Please sign in to comment.