Table of Contents

Interface IHealthContributor

Namespace
Steeltoe.Common.HealthChecks
Assembly
Steeltoe.Common.dll

Implement this interface and add to DI to be included in health checks.

public interface IHealthContributor

Properties

Id

Gets an identifier for the type of check being performed.

string Id { get; }

Property Value

string

Methods

CheckHealthAsync(CancellationToken)

Performs a health check.

Task<HealthCheckResult?> CheckHealthAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task<HealthCheckResult>

The result of the health check, or null if this health check is currently disabled.