pub struct Publisher { /* private fields */ }Expand description
Periodically publishes node state to DHT for peer discovery.
Publishes a record after an initial 10s delay, then repeatedly with randomized 0-49s intervals, containing this node’s active neighbor list and message hashes for bubble detection and merging.
Implementations§
Source§impl Publisher
impl Publisher
Sourcepub fn new(
record_publisher: RecordPublisher,
gossip_receiver: GossipReceiver,
) -> Result<Self>
pub fn new( record_publisher: RecordPublisher, gossip_receiver: GossipReceiver, ) -> Result<Self>
Create a new background publisher.
Spawns a background task that periodically publishes records.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Publisher
impl RefUnwindSafe for Publisher
impl Send for Publisher
impl Sync for Publisher
impl Unpin for Publisher
impl UnwindSafe for Publisher
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