pub struct ProberConfig {
pub interval: Duration,
pub staleness_weight: f64,
pub quality_weight: f64,
pub base_priority: f64,
pub shuffle_ttl: Duration,
pub probe_connected_only: bool,
}Expand description
Configuration for the probing mechanism
Fields§
§interval: DurationThe delay between individual probing rounds for neighbor discovery
staleness_weight: f64Weight for the staleness factor in probe priority (0.0–1.0).
Higher values prioritize probing edges that haven’t been measured recently.
Set to 0.0 to disable staleness-based probing (edges are not prioritized by age).
At least one of staleness_weight, quality_weight, or base_priority must be positive.
quality_weight: f64Weight for the inverse quality factor in probe priority (0.0–1.0).
Higher values prioritize probing edges with poor quality scores.
Set to 0.0 to disable quality-based probing (edges are not prioritized by their score).
At least one of staleness_weight, quality_weight, or base_priority must be positive.
base_priority: f64Minimum probe chance added for all peers regardless of measurements (0.0–1.0).
Ensures that even well-measured, recently-probed peers retain some chance of re-probing.
Set to 0.0 only when staleness_weight and/or quality_weight are sufficient to
guarantee all peers receive probe opportunities.
At least one of staleness_weight, quality_weight, or base_priority must be positive.
shuffle_ttl: DurationTTL for the cached weighted shuffle order.
When expired, the graph is re-traversed and a new priority-ordered shuffle is computed.
Defaults to 2 × interval.
probe_connected_only: boolWhen true, neighbor probes are only sent to peers that have a
Connected(true) edge in the graph (i.e. the background discovery
process has already established a transport-level connection).
When false, all known peers are probed regardless of connection
state — useful during bootstrap or when discovery runs out-of-band.
Trait Implementations§
Source§impl Clone for ProberConfig
impl Clone for ProberConfig
Source§fn clone(&self) -> ProberConfig
fn clone(&self) -> ProberConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProberConfig
impl Debug for ProberConfig
Source§impl Default for ProberConfig
impl Default for ProberConfig
Source§impl PartialEq for ProberConfig
impl PartialEq for ProberConfig
impl Copy for ProberConfig
impl StructuralPartialEq for ProberConfig
Auto Trait Implementations§
impl Freeze for ProberConfig
impl RefUnwindSafe for ProberConfig
impl Send for ProberConfig
impl Sync for ProberConfig
impl Unpin for ProberConfig
impl UnwindSafe for ProberConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more