namespace ZB.MOM.WW.Health;

/// <summary>
/// Single-property seam: is this node the active / leader node?
/// </summary>
/// <remarks>
/// Attach to endpoints or route groups via
/// <see cref="ActiveNodeGateExtensions.RequireActiveNode"/>. A standby node must not serve the
/// gated routes, so the filter returns HTTP 503 when <see cref="IsActiveNode"/> is <c>false</c>.
/// The implementation is supplied by the consumer — the <c>ZB.MOM.WW.Health.Akka</c> package ships
/// <c>AkkaActiveNodeGate</c> for clustered nodes; non-Akka hosts provide their own.
/// </remarks>
public interface IActiveNodeGate
{
    /// <summary>
    /// <c>true</c> when this node is the active node and may serve gated routes;
    /// <c>false</c> on a standby node.
    /// </summary>
    bool IsActiveNode { get; }
}
