Table of Contents

Class TransportHealthCheckResult

Namespace
Excalibur.Dispatch.Transport
Assembly
Excalibur.Dispatch.Abstractions.dll

Result of a transport health check operation.

public sealed class TransportHealthCheckResult
Inheritance
TransportHealthCheckResult
Inherited Members
Extension Methods

Constructors

TransportHealthCheckResult(TransportHealthStatus, string, TransportHealthCheckCategory, TimeSpan, IReadOnlyDictionary<string, object>?, DateTimeOffset?)

Initializes a new instance of the TransportHealthCheckResult class.

public TransportHealthCheckResult(TransportHealthStatus status, string description, TransportHealthCheckCategory categories, TimeSpan duration, IReadOnlyDictionary<string, object>? data = null, DateTimeOffset? timestamp = null)

Parameters

status TransportHealthStatus

The health status.

description string

Description of the health status.

categories TransportHealthCheckCategory

The categories that were checked.

duration TimeSpan

Duration of the health check.

data IReadOnlyDictionary<string, object>

Additional health data.

timestamp DateTimeOffset?

Timestamp of the health check.

Properties

Categories

Gets the categories that were checked.

public TransportHealthCheckCategory Categories { get; }

Property Value

TransportHealthCheckCategory

Data

Gets additional health data.

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

Property Value

IReadOnlyDictionary<string, object>

Description

Gets the description of the health status.

public string Description { get; }

Property Value

string

Duration

Gets the duration of the health check.

public TimeSpan Duration { get; }

Property Value

TimeSpan

IsHealthy

Gets a value indicating whether the component is healthy.

public bool IsHealthy { get; }

Property Value

bool

Status

Gets the health status.

public TransportHealthStatus Status { get; }

Property Value

TransportHealthStatus

Timestamp

Gets the timestamp of the health check.

public DateTimeOffset Timestamp { get; }

Property Value

DateTimeOffset

Methods

Degraded(string, TransportHealthCheckCategory, TimeSpan, IReadOnlyDictionary<string, object>?)

Creates a degraded health check result.

public static TransportHealthCheckResult Degraded(string description, TransportHealthCheckCategory categories, TimeSpan duration, IReadOnlyDictionary<string, object>? data = null)

Parameters

description string

Description of the degraded status.

categories TransportHealthCheckCategory

The categories that were checked.

duration TimeSpan

Duration of the health check.

data IReadOnlyDictionary<string, object>

Additional health data.

Returns

TransportHealthCheckResult

A degraded health check result.

Healthy(string, TransportHealthCheckCategory, TimeSpan, IReadOnlyDictionary<string, object>?)

Creates a healthy health check result.

public static TransportHealthCheckResult Healthy(string description, TransportHealthCheckCategory categories, TimeSpan duration, IReadOnlyDictionary<string, object>? data = null)

Parameters

description string

Description of the healthy status.

categories TransportHealthCheckCategory

The categories that were checked.

duration TimeSpan

Duration of the health check.

data IReadOnlyDictionary<string, object>

Additional health data.

Returns

TransportHealthCheckResult

A healthy health check result.

Unhealthy(string, TransportHealthCheckCategory, TimeSpan, IReadOnlyDictionary<string, object>?)

Creates an unhealthy health check result.

public static TransportHealthCheckResult Unhealthy(string description, TransportHealthCheckCategory categories, TimeSpan duration, IReadOnlyDictionary<string, object>? data = null)

Parameters

description string

Description of the unhealthy status.

categories TransportHealthCheckCategory

The categories that were checked.

duration TimeSpan

Duration of the health check.

data IReadOnlyDictionary<string, object>

Additional health data.

Returns

TransportHealthCheckResult

An unhealthy health check result.