pub enum IdleTimeoutResolution {
Default,
Configured,
Clamped {
configured: u64,
},
Unparseable {
raw: String,
},
}Expand description
How parse_idle_timeout_secs arrived at the timeout now in force.
A distinct enum rather than the plain clamped: bool the plan sketched:
there are FOUR distinguishable resolutions, not two, and the loud operator
notice needs to name the value that was configured — which a bool cannot
carry. ValidateOutcome in pipeline_outcomes.rs makes the same argument
for the same reason.
Variants§
Default
Nothing was configured; the default — which is the floor — is in force.
Configured
A configured value at or above the floor is in force verbatim.
Clamped
A configured value BELOW the floor was raised to it (D-04).
Unparseable
A value was set but could not be parsed; the default is in force.
Loud for the same reason the clamp is. An operator who meant 600 and
typed 60O silently gets the 120s default, and a legitimately slow stage then dies
on a timeout nobody chose. parse_gate_max_unattended_age substitutes
silently in this case and is the anti-pattern here, not the precedent.
Trait Implementations§
Source§impl Clone for IdleTimeoutResolution
impl Clone for IdleTimeoutResolution
Source§fn clone(&self) -> IdleTimeoutResolution
fn clone(&self) -> IdleTimeoutResolution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more