pub struct RandomFanout { /* private fields */ }Expand description
Random fanout gossip strategy
Selects a random subset of peers for each gossip round. This is the classic epidemic gossip approach.
§Fanout Selection
- fanout=1: Minimal, slow convergence, lowest overhead
- fanout=2: Standard, O(log N) convergence, good balance
- fanout=3+: Fast convergence, higher overhead
For most HIVE deployments, fanout=2 is recommended.
Implementations§
Trait Implementations§
Source§impl Clone for RandomFanout
impl Clone for RandomFanout
Source§fn clone(&self) -> RandomFanout
fn clone(&self) -> RandomFanout
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 moreSource§impl Debug for RandomFanout
impl Debug for RandomFanout
Source§impl Default for RandomFanout
impl Default for RandomFanout
Source§impl GossipStrategy for RandomFanout
impl GossipStrategy for RandomFanout
Source§fn select_peers<'a>(&self, peers: &'a [HivePeer]) -> Vec<&'a HivePeer>
fn select_peers<'a>(&self, peers: &'a [HivePeer]) -> Vec<&'a HivePeer>
Select peers to send a gossip message to Read more
Source§fn should_forward(&self, result: &MergeResult) -> bool
fn should_forward(&self, result: &MergeResult) -> bool
Determine if an update should be forwarded after a merge Read more
Auto Trait Implementations§
impl Freeze for RandomFanout
impl RefUnwindSafe for RandomFanout
impl Send for RandomFanout
impl Sync for RandomFanout
impl Unpin for RandomFanout
impl UnwindSafe for RandomFanout
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