Skip to content

Commit 22ca779

Browse files
adding grpc health check (#12)
1 parent 5c63161 commit 22ca779

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/Program.cs

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public static void Main(string[] args) {
3636
app.UseRouting();
3737
app.UseEndpoints(endpoints => {
3838
endpoints.MapGrpcService<Microsoft.Azure.SpaceFx.Core.Services.MessageReceiver>();
39+
endpoints.MapGrpcHealthChecksService();
3940
endpoints.MapGet("/", async context => {
4041
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");
4142
});

test/debugClient/Program.cs

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public static void Main(string[] args) {
4343
app.UseRouting();
4444
app.UseEndpoints(endpoints => {
4545
endpoints.MapGrpcService<Core.Services.MessageReceiver>();
46+
endpoints.MapGrpcHealthChecksService();
4647
endpoints.MapGet("/", async context => {
4748
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");
4849
});

test/integrationTests/TestSharedContext.cs

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public TestSharedContext() {
5050
_grpcHost.UseRouting();
5151
_grpcHost.UseEndpoints(endpoints => {
5252
endpoints.MapGrpcService<Core.Services.MessageReceiver>();
53+
endpoints.MapGrpcHealthChecksService();
5354
endpoints.MapGet("/", async context => {
5455
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");
5556
});

0 commit comments

Comments
 (0)