Table of Contents

Class HealthCheckResult

Namespace
DotCompute.Abstractions.Health
Assembly
DotCompute.Abstractions.dll

Result of a health check operation.

public sealed class HealthCheckResult
Inheritance
HealthCheckResult
Inherited Members

Properties

Data

Gets additional data about the health check.

public IReadOnlyDictionary<string, object>? Data { get; init; }

Property Value

IReadOnlyDictionary<string, object>

Description

Gets an optional description of the health status.

public string? Description { get; init; }

Property Value

string

Duration

Gets the duration of the health check.

public TimeSpan Duration { get; init; }

Property Value

TimeSpan

Status

Gets the health status.

public required HealthStatus Status { get; init; }

Property Value

HealthStatus

Timestamp

Gets the timestamp of the health check.

public DateTimeOffset Timestamp { get; init; }

Property Value

DateTimeOffset

Methods

Degraded(string?)

Creates a degraded result.

public static HealthCheckResult Degraded(string? description = null)

Parameters

description string

Returns

HealthCheckResult

Healthy(string?)

Creates a healthy result.

public static HealthCheckResult Healthy(string? description = null)

Parameters

description string

Returns

HealthCheckResult

Unhealthy(string?)

Creates an unhealthy result.

public static HealthCheckResult Unhealthy(string? description = null)

Parameters

description string

Returns

HealthCheckResult