Module strategy

Module strategy 

Source
Expand description

Probe-scheduling strategies for neighbor discovery.

A NeighborProbeStrategy controls when hellos and liveness probes are sent. The state machine (face creation, FIB wiring, neighbor table mutations) lives in the protocol implementation (EtherND, UdpND, …) and is completely independent.

§Strategy types

ModuleTypeProfile
backoffBackoffSchedulerLAN, Campus, Static
reactiveReactiveSchedulerMobile, low-traffic nodes
passivePassiveSchedulerHighMobility, dense mesh

§Factory

build_strategy constructs the right scheduler from a DiscoveryConfig. Pass the result as Box<dyn NeighborProbeStrategy> into the protocol constructor; swap it at runtime without restarting the protocol.

Re-exports§

pub use backoff::BackoffScheduler;
pub use composite::CompositeStrategy;
pub use passive::PassiveScheduler;
pub use reactive::ReactiveScheduler;
pub use swim::SwimScheduler;

Modules§

backoff
Exponential-backoff probe scheduler.
composite
Composite probe scheduler — runs multiple strategies simultaneously.
passive
Passive neighbor-detection probe scheduler.
reactive
Event-driven (reactive) probe scheduler.
swim
SWIM-style fixed-interval probe scheduler.

Enums§

ProbeRequest
An action returned by NeighborProbeStrategy::on_tick.
TriggerEvent
An out-of-band event that informs the strategy and may cause an early probe.

Traits§

NeighborProbeStrategy
Controls the when of hello/probe scheduling.

Functions§

build_strategy
Construct the appropriate NeighborProbeStrategy for the given config.