Table of Contents

Interface IHealthCheckPublisherRegistry

Namespace
Acuit.Pinpoint.HealthChecks
Assembly
Acuit.Pinpoint.HealthChecks.Abstractions.dll

A registry of health check publishers.

public interface IHealthCheckPublisherRegistry

Methods

RegisterConsolidatedHealthCheckPublisher(IHealthCheckPublisher)

Registers a health check publisher for consolidated health reports.

IDisposable RegisterConsolidatedHealthCheckPublisher(IHealthCheckPublisher healthCheckPublisher)

Parameters

healthCheckPublisher IHealthCheckPublisher

The health check publisher.

Returns

IDisposable

A IDisposable that can be used to remove the registration.

Remarks

Consolidated health reports contain the most recent health check result from each registered health check. If a health check has been registered but not yet performed, it will not be in the report.

This provides a convenient way to monitor the overall health of the system, as health checks can be performed at different times and intervals, reported via separate health reports to the IHealthCheckPublisher instances registered via RegisterHealthCheckPublisher(IHealthCheckPublisher).

The HealthReport instance presented to healthCheckPublisher will always have a TotalDuration of Zero.

Health check reports will be published from a thread pool thread.

Exceptions

ArgumentNullException

healthCheckPublisher is null.

RegisterHealthCheckPublisher(IHealthCheckPublisher)

Registers a health check publisher.

IDisposable RegisterHealthCheckPublisher(IHealthCheckPublisher healthCheckPublisher)

Parameters

healthCheckPublisher IHealthCheckPublisher

The health check publisher.

Returns

IDisposable

A IDisposable that can be used to remove the registration.

Remarks

When health checks are registered to be performed at different delay or period times, the health check publisher will receive separate health reports, with health checks grouped by their delay and period times. RegisterConsolidatedHealthCheckPublisher(IHealthCheckPublisher) can be used instead to register a publisher that will receive consolidated health reports containing all health checks.

Health check reports will be published from a thread pool thread.

Exceptions

ArgumentNullException

healthCheckPublisher is null.