namespace ScadaLink.InboundAPI; /// /// InboundAPI-008: abstraction the inbound API endpoint uses to determine whether /// this node is the active (cluster-leader) central node. /// /// The design states the inbound API is "Central cluster only (active node)" and /// "fails over with it". A standby central node must not execute method scripts or /// Route.To() calls — that can race the active node or run against stale /// singleton state. consults this gate and /// returns HTTP 503 from a standby so Traefik/clients only reach the live node. /// /// The implementation lives in the Host (it needs Akka cluster state); when no /// implementation is registered, the endpoint defaults to "allow" so non-clustered /// hosts and tests are unaffected. /// public interface IActiveNodeGate { /// /// true when this node is the active central node and may serve the /// inbound API; false on a standby node. /// bool IsActiveNode { get; } }