hyperlane-plugin-maintenance 23.3.1

A lock-free atomic maintenance and read-only mode plugin for the Hyperlane framework with live zero-restart switching, path and constant-time bypass-token exemptions, Retry-After headers, and prebuilt 503 wire responses.
Documentation
/// Runtime operating mode enforced by [`MaintenancePlugin`].
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum MaintenanceMode {
    /// Normal traffic admission.
    #[default]
    Active,
    /// Safe read methods (`GET`, `HEAD`, `OPTIONS`) pass; mutating methods receive `503`.
    ReadOnly,
    /// All non-exempt traffic receives `503 Service Unavailable`.
    Maintenance,
}

/// Evaluation outcome returned by [`MaintenancePlugin::evaluate`].
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum MaintenanceDecision {
    /// Request is allowed to continue down the pipeline.
    Allow,
    /// Request was admitted via path or token bypass while restricted.
    Bypassed,
    /// Request was rejected due to read-only mode.
    RejectReadOnly,
    /// Request was rejected due to full maintenance mode.
    RejectMaintenance,
}