Class RegionHealth
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
Represents the health status of a region.
public sealed record RegionHealth : IEquatable<RegionHealth>
- Inheritance
-
RegionHealth
- Implements
- Inherited Members
Constructors
RegionHealth(string, bool, TimeSpan, DateTimeOffset, int, string?, IReadOnlyDictionary<string, string>?)
Represents the health status of a region.
public RegionHealth(string RegionId, bool IsHealthy, TimeSpan Latency, DateTimeOffset LastChecked, int ConsecutiveFailures, string? ErrorMessage = null, IReadOnlyDictionary<string, string>? Diagnostics = null)
Parameters
RegionIdstringThe identifier of the region.
IsHealthyboolWhether the region is responding to health checks.
LatencyTimeSpanThe measured latency to the region.
LastCheckedDateTimeOffsetWhen the last health check was performed.
ConsecutiveFailuresintNumber of consecutive health check failures.
ErrorMessagestringError message if unhealthy; null otherwise.
DiagnosticsIReadOnlyDictionary<string, string>Additional diagnostic information.
Properties
ConsecutiveFailures
Number of consecutive health check failures.
public int ConsecutiveFailures { get; init; }
Property Value
Diagnostics
Additional diagnostic information.
public IReadOnlyDictionary<string, string>? Diagnostics { get; init; }
Property Value
ErrorMessage
Error message if unhealthy; null otherwise.
public string? ErrorMessage { get; init; }
Property Value
IsHealthy
Whether the region is responding to health checks.
public bool IsHealthy { get; init; }
Property Value
LastChecked
When the last health check was performed.
public DateTimeOffset LastChecked { get; init; }
Property Value
Latency
The measured latency to the region.
public TimeSpan Latency { get; init; }
Property Value
RegionId
The identifier of the region.
public string RegionId { get; init; }