pub enum ClientTimeout {
After(Duration),
Never,
}Expand description
How long a host waits with nobody connected before it stops.
Default is ten seconds, which is long enough to survive a panel
reloading and short enough that a dead orchestrator does not leave hardware
running for minutes.
Variants§
After(Duration)
Stop once nobody has been connected for this long.
Never
Never stop on an idle connection.
For a host meant to outlive its clients: one started by hand, or one an operator connects to occasionally. Nothing here will end the process, so something else has to.
Implementations§
Source§impl ClientTimeout
impl ClientTimeout
Sourcepub const fn from_seconds(seconds: u64) -> Self
pub const fn from_seconds(seconds: u64) -> Self
Builds a timeout from seconds, where 0 means Never.
For a command line or a config file, where “no limit” has to be expressible as a number. Zero is the sentinel because a zero-second timeout would otherwise mean “stop immediately”, which nobody wants and which would make the host unusable.
Trait Implementations§
Source§impl Clone for ClientTimeout
impl Clone for ClientTimeout
Source§fn clone(&self) -> ClientTimeout
fn clone(&self) -> ClientTimeout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more