Interface IHealthCheckService
- Namespace
- Acuit.Pinpoint.HealthChecks
- Assembly
- Acuit.Pinpoint.HealthChecks.dll
A service which can be used to register and check the status of IHealthCheck instances.
public interface IHealthCheckService
Properties
Registrations
Gets the collection of health check registrations.
ICollection<HealthCheckRegistration> Registrations { get; }
Property Value
Methods
CheckHealthAsync(Func<HealthCheckRegistration, bool>, CancellationToken)
Runs the provided health checks and returns the aggregated status
Task<HealthReport> CheckHealthAsync(Func<HealthCheckRegistration, bool> predicate, CancellationToken cancellationToken = default)
Parameters
predicate
Func<HealthCheckRegistration, bool>A predicate that can be used to include health checks based on user-defined criteria.
cancellationToken
CancellationTokenA CancellationToken which can be used to cancel the health checks.
Returns
- Task<HealthReport>
A Task<TResult> which will complete when all the health checks have been run, yielding a HealthReport containing the results.
CheckHealthAsync(CancellationToken)
Runs all the health checks in the application and returns the aggregated status.
Task<HealthReport> CheckHealthAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenA CancellationToken which can be used to cancel the health checks.
Returns
- Task<HealthReport>
A Task<TResult> which will complete when all the health checks have been run, yielding a HealthReport containing the results.