namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;

/// <summary>
///     Point-in-time state of a single historian cluster node, included inside
///     <see cref="HistorianHealthSnapshot.Nodes"/> when the backend is clustered.
/// </summary>
/// <param name="Name">Node identifier — backend-specific (typically a hostname).</param>
/// <param name="IsHealthy">True when the node is currently considered usable for reads.</param>
/// <param name="CooldownUntil">When the next retry against an unhealthy node is allowed; null when no cooldown is active.</param>
/// <param name="FailureCount">Consecutive failures observed against this node since the last success.</param>
/// <param name="LastError">Diagnostic text from the last failure against this node; null when no failures.</param>
/// <param name="LastFailureTime">UTC of the last failure against this node; null when no failures.</param>
public sealed record HistorianClusterNodeState(
    string Name,
    bool IsHealthy,
    DateTime? CooldownUntil,
    int FailureCount,
    string? LastError,
    DateTime? LastFailureTime);
