Struct Liveness
pub struct Liveness {
pub ping_interval: Duration,
pub timeout: Duration,
}Expand description
When the server revokes the lease of a worker it no longer hears from.
A worker that offers proto::LEASE_LIVENESS sends PING every
ping_interval while it holds the lease. The server revokes the lease
once it has spent timeout waiting to read from the worker without
receiving a byte, or once a write to the worker has made no progress for
timeout. Disk work runs on shard threads, never on the reader, and time
the reader does not read (a stalled runtime, a shard’s full queue) does
not count: the worker’s pings wait in the socket meanwhile.
Fields§
§ping_interval: DurationHow often the lease holder pings. Default one second.
timeout: DurationSilence after which the lease is revoked; longer than the interval. Default five seconds.
Trait Implementations§
impl Copy for Liveness
impl Eq for Liveness
impl StructuralPartialEq for Liveness
Auto Trait Implementations§
impl Freeze for Liveness
impl RefUnwindSafe for Liveness
impl Send for Liveness
impl Sync for Liveness
impl Unpin for Liveness
impl UnsafeUnpin for Liveness
impl UnwindSafe for Liveness
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