pub struct DiscoveryConfig {
pub hello_strategy: HelloStrategyKind,
pub hello_interval_base: Duration,
pub hello_interval_max: Duration,
pub hello_jitter: f32,
pub liveness_timeout: Duration,
pub liveness_miss_count: u32,
pub probe_timeout: Duration,
pub swim_indirect_fanout: u32,
pub gossip_fanout: u32,
pub prefix_announcement: PrefixAnnouncementMode,
pub auto_create_faces: bool,
pub tick_interval: Duration,
}Expand description
Concrete discovery parameters.
Obtain via DiscoveryConfig::for_profile and adjust as needed,
or construct from scratch for fully custom deployments.
Fields§
§hello_strategy: HelloStrategyKindProbe-scheduling algorithm.
hello_interval_base: DurationInitial hello interval (fast bootstrap).
hello_interval_max: DurationMaximum hello interval after full exponential backoff.
hello_jitter: f32Fractional jitter applied to each hello interval (0.0–0.5).
0.25 means ±25 % of the current interval is added as random noise.
liveness_timeout: DurationHow long without a hello response before Established → Stale.
liveness_miss_count: u32Consecutive missed hellos before Stale → Absent (face/FIB removal).
probe_timeout: DurationHow long to wait for a hello response before declaring a probe lost.
swim_indirect_fanout: u32SWIM indirect-probe fanout K (0 = SWIM disabled).
gossip_fanout: u32Emergency gossip-broadcast fanout K (0 = disabled). When a neighbor goes Stale, K unicast hellos are sent to other established peers so they can independently verify the failure.
prefix_announcement: PrefixAnnouncementModePrefix announcement mode.
auto_create_faces: boolAutomatically create unicast faces for discovered peers.
tick_interval: DurationHow often the engine calls DiscoveryProtocol::on_tick.
Smaller values improve responsiveness at the cost of CPU overhead.
Default: 100 ms.
Implementations§
Source§impl DiscoveryConfig
impl DiscoveryConfig
Sourcepub fn for_profile(profile: &DiscoveryProfile) -> Self
pub fn for_profile(profile: &DiscoveryProfile) -> Self
Build the default config for the given deployment profile.
Trait Implementations§
Source§impl Clone for DiscoveryConfig
impl Clone for DiscoveryConfig
Source§fn clone(&self) -> DiscoveryConfig
fn clone(&self) -> DiscoveryConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more