Class HealthCheckPublisherHostedService
- Namespace
- Acuit.Pinpoint.HealthChecks
- Assembly
- Acuit.Pinpoint.HealthChecks.dll
A health check publisher hosted service.
public sealed class HealthCheckPublisherHostedService : IHostedService
- Inheritance
-
HealthCheckPublisherHostedService
- Implements
- Inherited Members
Constructors
HealthCheckPublisherHostedService(IHealthCheckService, IOptions<HealthCheckPublisherOptions>, IEnumerable<IHealthCheckPublisher>)
Initializes a new instance of the HealthCheckPublisherHostedService class.
public HealthCheckPublisherHostedService(IHealthCheckService healthCheckService, IOptions<HealthCheckPublisherOptions> options, IEnumerable<IHealthCheckPublisher> publishers)
Parameters
healthCheckService
IHealthCheckServiceThe health check service.
options
IOptions<HealthCheckPublisherOptions>Options.
publishers
IEnumerable<IHealthCheckPublisher>The list of publishers.
Methods
StartAsync(CancellationToken)
Triggered when the application host is ready to start the service.
public Task StartAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenIndicates that the start process has been aborted.
Returns
StopAsync(CancellationToken)
Triggered when the application host is performing a graceful shutdown.
public Task StopAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenIndicates that the shutdown process should no longer be graceful.