pub struct SwimScheduler { /* private fields */ }Expand description
Fixed-interval SWIM probe scheduler.
Broadcasts a hello at every interval. Unlike BackoffScheduler it
never increases its interval after a successful exchange. Topology changes
(trigger()) cause an immediate probe on the next tick, after which the
regular period resumes.
Implementations§
Source§impl SwimScheduler
impl SwimScheduler
Sourcepub fn new(interval: Duration) -> Self
pub fn new(interval: Duration) -> Self
Create a scheduler firing every interval.
Sends an immediate probe on the first tick to bootstrap the neighbor table.
Sourcepub fn from_discovery_config(cfg: &DiscoveryConfig) -> Self
pub fn from_discovery_config(cfg: &DiscoveryConfig) -> Self
Build from a DiscoveryConfig, using hello_interval_base as the
fixed SWIM protocol period T.
Trait Implementations§
Source§impl NeighborProbeStrategy for SwimScheduler
impl NeighborProbeStrategy for SwimScheduler
Source§fn on_tick(&mut self, now: Instant) -> Vec<ProbeRequest>
fn on_tick(&mut self, now: Instant) -> Vec<ProbeRequest>
Advance the scheduler’s clock to
now. Read moreSource§fn on_probe_success(&mut self, _rtt: Duration)
fn on_probe_success(&mut self, _rtt: Duration)
A probe response was received with the given round-trip time. Read more
Source§fn on_probe_timeout(&mut self)
fn on_probe_timeout(&mut self)
A probe timed out (no response within
probe_timeout). Read moreSource§fn trigger(&mut self, event: TriggerEvent)
fn trigger(&mut self, event: TriggerEvent)
An external topology event occurred. Read more
Auto Trait Implementations§
impl Freeze for SwimScheduler
impl RefUnwindSafe for SwimScheduler
impl Send for SwimScheduler
impl Sync for SwimScheduler
impl Unpin for SwimScheduler
impl UnwindSafe for SwimScheduler
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