Table of Contents

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

registry IHealthCheckRegistry
name string

The health check name.

instance IHealthCheck

The IHealthCheck instance.

Returns

IDisposable

A IDisposable that can be used to remove the registration.

Exceptions

ArgumentNullException

name is null.

ArgumentNullException

instance is 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

registry IHealthCheckRegistry
name string

The health check name.

instance IHealthCheck

The IHealthCheck instance.

failureStatus HealthStatus?

The HealthStatus that should be reported upon failure of the health check. If the provided value is null, then Unhealthy will be reported.

tags IEnumerable<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

name is null.

ArgumentNullException

instance is 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

registry IHealthCheckRegistry
name string

The health check name.

initialHealthCheckResult HealthCheckResult

Returns

IPushHealthCheck

A IPushHealthCheck that can be used to set the health status and to remove the registration.

Exceptions

ArgumentNullException

name is 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

registry IHealthCheckRegistry
name string

The health check name.

tags IEnumerable<string>

A list of tags that can be used for filtering health checks.

initialHealthCheckResult HealthCheckResult

Returns

IPushHealthCheck

A IPushHealthCheck that can be used to set the health status and to remove the registration.

Exceptions

ArgumentNullException

name is null.