pub struct MaintenanceConfig {
pub enabled: bool,
pub message: String,
pub retry_after_seconds: u64,
pub severity: String,
pub estimated_end_at: Option<String>,
pub allow_paths: Vec<String>,
}Expand description
Maintenance-mode configuration. Typically deserialized from the consumer
app’s YAML config under a maintenance: key.
Fields§
§enabled: boolWhether the gate is active at boot. Can be toggled at runtime via the admin endpoint.
message: StringHuman-readable message returned in the 503 body.
retry_after_seconds: u64Value sent in the Retry-After header and in the response body.
severity: String"info" | "warning" | "critical" — surfaced to consumer apps for
banner styling. Free-form; treat as advisory.
estimated_end_at: Option<String>Optional ISO 8601 timestamp; consumers can render an ETA banner.
allow_paths: Vec<String>Path prefixes that bypass the gate. Health probes, the maintenance admin/status endpoints themselves, and any login route MUST be included or the system can become unrecoverable.
Trait Implementations§
Source§impl Clone for MaintenanceConfig
impl Clone for MaintenanceConfig
Source§impl Debug for MaintenanceConfig
impl Debug for MaintenanceConfig
Source§impl Default for MaintenanceConfig
impl Default for MaintenanceConfig
Source§impl<'de> Deserialize<'de> for MaintenanceConfig
impl<'de> Deserialize<'de> for MaintenanceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MaintenanceConfig
impl RefUnwindSafe for MaintenanceConfig
impl Send for MaintenanceConfig
impl Sync for MaintenanceConfig
impl Unpin for MaintenanceConfig
impl UnsafeUnpin for MaintenanceConfig
impl UnwindSafe for MaintenanceConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more