Class HealthCheckRegistryExtensions
- Namespace
- Acuit.Pinpoint.HealthChecks
- Assembly
- Acuit.Pinpoint.HealthChecks.Abstractions.dll
Extension members for IHealthCheckRegistry.
public static class HealthCheckRegistryExtensions
- Inheritance
-
HealthCheckRegistryExtensions
- Inherited Members
Methods
RegisterHealthCheck(IHealthCheckRegistry, string, IHealthCheck)
Registers a health check for an existing IHealthCheck instance.
public static IDisposable RegisterHealthCheck(this IHealthCheckRegistry registry, string name, IHealthCheck instance)
Parameters
registryIHealthCheckRegistrynamestringThe health check name.
instanceIHealthCheckThe IHealthCheck instance.
Returns
- IDisposable
A IDisposable that can be used to remove the registration.
Exceptions
- ArgumentNullException
nameis null.- ArgumentNullException
instanceis null.
RegisterHealthCheck(IHealthCheckRegistry, string, IHealthCheck, HealthStatus?, IEnumerable<string>?)
Registers a health check for an existing IHealthCheck instance.
public static IDisposable RegisterHealthCheck(this IHealthCheckRegistry registry, string name, IHealthCheck instance, HealthStatus? failureStatus, IEnumerable<string>? tags)
Parameters
registryIHealthCheckRegistrynamestringThe health check name.
instanceIHealthCheckThe IHealthCheck instance.
failureStatusHealthStatus?The HealthStatus that should be reported upon failure of the health check. If the provided value is null, then Unhealthy will be reported.
tagsIEnumerable<string>A list of tags that can be used for filtering health checks.
Returns
- IDisposable
A IDisposable that can be used to remove the registration.
Exceptions
- ArgumentNullException
nameis null.- ArgumentNullException
instanceis null.
RegisterPushHealthCheck(IHealthCheckRegistry, string, HealthCheckResult)
Registers a health check that gets its health status from an external source.
public static IPushHealthCheck RegisterPushHealthCheck(this IHealthCheckRegistry registry, string name, HealthCheckResult initialHealthCheckResult)
Parameters
registryIHealthCheckRegistrynamestringThe health check name.
initialHealthCheckResultHealthCheckResult
Returns
- IPushHealthCheck
A IPushHealthCheck that can be used to set the health status and to remove the registration.
Exceptions
- ArgumentNullException
nameis null.
RegisterPushHealthCheck(IHealthCheckRegistry, string, IEnumerable<string>?, HealthCheckResult)
Registers a health check that gets its health status from an external source.
public static IPushHealthCheck RegisterPushHealthCheck(this IHealthCheckRegistry registry, string name, IEnumerable<string>? tags, HealthCheckResult initialHealthCheckResult)
Parameters
registryIHealthCheckRegistrynamestringThe health check name.
tagsIEnumerable<string>A list of tags that can be used for filtering health checks.
initialHealthCheckResultHealthCheckResult
Returns
- IPushHealthCheck
A IPushHealthCheck that can be used to set the health status and to remove the registration.
Exceptions
- ArgumentNullException
nameis null.