HealthCheckService Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A service which can be used to check the status of IHealthCheck instances registered in the application.
public ref class HealthCheckService abstract
public abstract class HealthCheckService
type HealthCheckService = class
Public MustInherit Class HealthCheckService
- Inheritance
-
HealthCheckService
Remarks
The default implementation of HealthCheckService is registered in the dependency injection container as a singleton service by calling AddHealthChecks(IServiceCollection).
The IHealthChecksBuilder returned by AddHealthChecks(IServiceCollection) provides a convenience API for registering health checks.
IHealthCheck implementations can be registered through extension methods provided by IHealthChecksBuilder.
Constructors
HealthCheckService() |
Methods
CheckHealthAsync(CancellationToken) |
Runs all the health checks in the application and returns the aggregated status. |
CheckHealthAsync(Func<HealthCheckRegistration,Boolean>, CancellationToken) |
Runs the provided health checks and returns the aggregated status |