IHealthCheckPublisher Interface

Definition

Represents a publisher of HealthReport information.

public interface class IHealthCheckPublisher
public interface IHealthCheckPublisher
type IHealthCheckPublisher = interface
Public Interface IHealthCheckPublisher

Remarks

The default health checks implementation provided an IHostedService implementation that can be used to execute health checks at regular intervals and provide the resulting HealthReport data to all registered IHealthCheckPublisher instances.

To provide an IHealthCheckPublisher implementation, register an instance or type as a singleton service in the dependency injection container.

IHealthCheckPublisher instances are provided with a HealthReport after executing health checks in a background thread. The use of IHealthCheckPublisher depend on hosting in an application using IWebHost or generic host (IHost). Execution of IHealthCheckPublisher instance is not related to execution of health checks via a middleware.

Methods

PublishAsync(HealthReport, CancellationToken)

Publishes the provided report.

Applies to