I am working with microservice (multiple services) and want to have HealthCheck service which I can call and get health of all the running service. I wan't to trigger healthcheck for each of the service. The idea is to get health of each service via GRPC.
One of my service has :
''' services.AddHealthChecks() .AddCheck("Ping", () => HealthCheckResult.Healthy("Ping is OK!"), tags: new[] { "ping_tag" }).AddDbContextCheck(name: "My DB"); '''
How can I run health check through code when my GRPC endpoint is called in this service and get result.