pub struct LifecycleConfig { /* private fields */ }Expand description
Timeouts, restart budget and the graceful stop request.
Implementations§
Source§impl LifecycleConfig
impl LifecycleConfig
pub fn new() -> Self
Sourcepub fn startup_timeout(self, timeout: Duration) -> Self
pub fn startup_timeout(self, timeout: Duration) -> Self
How long a launch (or a wait for another process’s launch) may take. Default 30 s.
Sourcepub fn poll_interval(self, interval: Duration) -> Self
pub fn poll_interval(self, interval: Duration) -> Self
Time between checks while waiting for a host to publish. Default 50 ms, at least 1 ms.
Sourcepub fn stop_grace(self, grace: Duration) -> Self
pub fn stop_grace(self, grace: Duration) -> Self
How long an owned host gets to exit after the graceful request before its process tree is killed. Default 5 s.
Sourcepub fn restart_policy(self, policy: RestartPolicy) -> Self
pub fn restart_policy(self, policy: RestartPolicy) -> Self
The restart budget for an owned host that exits or fails to start. Default
RestartPolicy::default (automatic, 3 per 60 s).
Sourcepub fn graceful_stop<F>(self, stop: F) -> Self
pub fn graceful_stop<F>(self, stop: F) -> Self
The graceful stop request for DaemonLifecycle::shutdown_owned.
Trait Implementations§
Source§impl Clone for LifecycleConfig
impl Clone for LifecycleConfig
Auto Trait Implementations§
impl !RefUnwindSafe for LifecycleConfig
impl !UnwindSafe for LifecycleConfig
impl Freeze for LifecycleConfig
impl Send for LifecycleConfig
impl Sync for LifecycleConfig
impl Unpin for LifecycleConfig
impl UnsafeUnpin for LifecycleConfig
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