21.345. Class HealthCheck

Namespace: ArmoniK.Core.Utils
Assembly: ArmoniK.Core.Utils.dll

Implementation of that manages FailureStatus and simplifies the implementation of Health Checks

[PublicAPI]
public class HealthCheck : IHealthCheck

21.345.1. Inheritance

objectHealthCheck

21.345.2. Implements

IHealthCheck

21.345.3. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

21.345.4. Constructors

21.345.4.1. HealthCheck(IHealthCheckProvider, HealthCheckTag)

Constructor that creates a HealthCheck from a

public HealthCheck(IHealthCheckProvider healthCheckProvider, HealthCheckTag tag)

21.345.4.1.1. Parameters

healthCheckProvider IHealthCheckProvider

Interface for classes that exposes a simplified Health Check

tag HealthCheckTag

Tag to filter which health check is executed

21.345.5. Methods

21.345.5.1. CheckHealthAsync(HealthCheckContext, CancellationToken)

Runs the health check, returning the status of the component being checked.

public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)

21.345.5.1.1. Parameters

context HealthCheckContext

A context object associated with the current execution.

cancellationToken CancellationToken

A that can be used to cancel the health check.

21.345.5.1.2. Returns

Task<HealthCheckResult>

A that completes when the health check has finished, yielding the status of the component being checked.

21.345.5.1.3. Exceptions

ArgumentOutOfRangeException