Class TransportHealthCheckResult
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
statusTransportHealthStatusThe health status.
descriptionstringDescription of the health status.
categoriesTransportHealthCheckCategoryThe categories that were checked.
durationTimeSpanDuration of the health check.
dataIReadOnlyDictionary<string, object>Additional health data.
timestampDateTimeOffset?Timestamp of the health check.
Properties
Categories
Gets the categories that were checked.
public TransportHealthCheckCategory Categories { get; }
Property Value
Data
Gets additional health data.
public IReadOnlyDictionary<string, object> Data { get; }
Property Value
Description
Gets the description of the health status.
public string Description { get; }
Property Value
Duration
Gets the duration of the health check.
public TimeSpan Duration { get; }
Property Value
IsHealthy
Gets a value indicating whether the component is healthy.
public bool IsHealthy { get; }
Property Value
Status
Gets the health status.
public TransportHealthStatus Status { get; }
Property Value
Timestamp
Gets the timestamp of the health check.
public DateTimeOffset Timestamp { get; }
Property Value
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
descriptionstringDescription of the degraded status.
categoriesTransportHealthCheckCategoryThe categories that were checked.
durationTimeSpanDuration of the health check.
dataIReadOnlyDictionary<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
descriptionstringDescription of the healthy status.
categoriesTransportHealthCheckCategoryThe categories that were checked.
durationTimeSpanDuration of the health check.
dataIReadOnlyDictionary<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
descriptionstringDescription of the unhealthy status.
categoriesTransportHealthCheckCategoryThe categories that were checked.
durationTimeSpanDuration of the health check.
dataIReadOnlyDictionary<string, object>Additional health data.
Returns
- TransportHealthCheckResult
An unhealthy health check result.