Table of Contents

Struct HealthCheckResult

Namespace
Acuit.Pinpoint.HealthChecks
Assembly
Acuit.Pinpoint.HealthChecks.dll

Represents the result of a health check.

public readonly struct HealthCheckResult
Inherited Members

Constructors

HealthCheckResult(HealthStatus, string, Exception)

Creates a new HealthCheckResult with the specified values for status, exception, and description.

public HealthCheckResult(HealthStatus status, string description = null, Exception exception = null)

Parameters

status HealthStatus

A value indicating the status of the component that was checked.

description string

A human-readable description of the status of the component that was checked.

exception Exception

An Exception representing the exception that was thrown when checking for status (if any).

Properties

Description

Gets a human-readable description of the status of the component that was checked.

public string Description { get; }

Property Value

string

Exception

Gets an Exception representing the exception that was thrown when checking for status (if any).

public Exception Exception { get; }

Property Value

Exception

Status

Gets a value indicating the status of the component that was checked.

public HealthStatus Status { get; }

Property Value

HealthStatus

Methods

Degraded(string, Exception)

Creates a HealthCheckResult representing a degraded component.

public static HealthCheckResult Degraded(string description = null, Exception exception = null)

Parameters

description string

A human-readable description of the status of the component that was checked. Optional.

exception Exception

An Exception representing the exception that was thrown when checking for status. Optional.

Returns

HealthCheckResult

A HealthCheckResult representing a degraged component.

Healthy(string)

Creates a HealthCheckResult representing a healthy component.

public static HealthCheckResult Healthy(string description = null)

Parameters

description string

A human-readable description of the status of the component that was checked. Optional.

Returns

HealthCheckResult

A HealthCheckResult representing a healthy component.

Unhealthy(string, Exception)

Creates a HealthCheckResult representing an unhealthy component.

public static HealthCheckResult Unhealthy(string description = null, Exception exception = null)

Parameters

description string

A human-readable description of the status of the component that was checked. Optional.

exception Exception

An Exception representing the exception that was thrown when checking for status. Optional.

Returns

HealthCheckResult

A HealthCheckResult representing an unhealthy component.