Class DefaultHealthCheckService
- Namespace
- Acuit.Pinpoint.HealthChecks
- Assembly
- Acuit.Pinpoint.HealthChecks.dll
A default implementation for IHealthCheckService.
public class DefaultHealthCheckService : IHealthCheckService
- Inheritance
-
DefaultHealthCheckService
- Implements
- Inherited Members
Properties
Registrations
Gets the collection of health check registrations.
public ICollection<HealthCheckRegistration> Registrations { get; }
Property Value
Methods
CheckHealthAsync(Func<HealthCheckRegistration, bool>, CancellationToken)
Runs the provided health checks and returns the aggregated status
public 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.
public 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.