Skip to content

Commit

Permalink
Add service health endpoint (#12)
Browse files Browse the repository at this point in the history
* adding Health Check Service

* updating to grpcHealthCheck
  • Loading branch information
bigtallcampbell authored Jul 31, 2024
1 parent 6757447 commit e3c85ea
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 @@ -32,6 +32,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 @@ -37,6 +37,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 @@ -51,6 +51,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 e3c85ea

Please sign in to comment.