pub struct BubbleMerge { /* private fields */ }Expand description
Detects and merges small isolated peer groups (bubbles).
Triggers when local peer count < min_neighbors and DHT records exist. Extracts active_peers
from DHT records and joins them.
Implementations§
Source§impl BubbleMerge
impl BubbleMerge
Sourcepub fn new(
record_publisher: RecordPublisher,
gossip_sender: GossipSender,
gossip_receiver: GossipReceiver,
cancel_token: CancellationToken,
max_join_peers: usize,
base_interval: Duration,
max_jitter: Duration,
min_neighbors: usize,
) -> Result<Self>
pub fn new( record_publisher: RecordPublisher, gossip_sender: GossipSender, gossip_receiver: GossipReceiver, cancel_token: CancellationToken, max_join_peers: usize, base_interval: Duration, max_jitter: Duration, min_neighbors: usize, ) -> Result<Self>
Create a new bubble merge detector.
Spawns a background task that periodically checks cluster size.
Trait Implementations§
Source§impl Clone for BubbleMerge
impl Clone for BubbleMerge
Source§fn clone(&self) -> BubbleMerge
fn clone(&self) -> BubbleMerge
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BubbleMerge
impl RefUnwindSafe for BubbleMerge
impl Send for BubbleMerge
impl Sync for BubbleMerge
impl Unpin for BubbleMerge
impl UnsafeUnpin for BubbleMerge
impl UnwindSafe for BubbleMerge
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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