pub struct EpidemicGossip { /* private fields */ }Expand description
Pull-gossip protocol for neighbor state dissemination.
Publishes and subscribes to neighbor snapshots at
/ndn/local/nd/gossip/<node-name>/<seq>. Remote node names discovered
via gossip are inserted into the neighbor table as Probing entries so the
normal hello state machine takes over.
Implementations§
Source§impl EpidemicGossip
impl EpidemicGossip
Sourcepub fn new(node_name: Name, config: DiscoveryConfig) -> Self
pub fn new(node_name: Name, config: DiscoveryConfig) -> Self
Create a new EpidemicGossip for node_name.
Trait Implementations§
Source§impl DiscoveryProtocol for EpidemicGossip
impl DiscoveryProtocol for EpidemicGossip
Source§fn protocol_id(&self) -> ProtocolId
fn protocol_id(&self) -> ProtocolId
Unique protocol identifier.
Source§fn claimed_prefixes(&self) -> &[Name]
fn claimed_prefixes(&self) -> &[Name]
NDN name prefixes this protocol reserves. Read more
Source§fn on_face_up(&self, _face_id: FaceId, _ctx: &dyn DiscoveryContext)
fn on_face_up(&self, _face_id: FaceId, _ctx: &dyn DiscoveryContext)
Called when a new face comes up (after
FaceTable::insert).Source§fn on_face_down(&self, _face_id: FaceId, _ctx: &dyn DiscoveryContext)
fn on_face_down(&self, _face_id: FaceId, _ctx: &dyn DiscoveryContext)
Called when a face goes down (before
FaceTable::remove).Source§fn on_inbound(
&self,
raw: &Bytes,
incoming_face: FaceId,
_meta: &InboundMeta,
ctx: &dyn DiscoveryContext,
) -> bool
fn on_inbound( &self, raw: &Bytes, incoming_face: FaceId, _meta: &InboundMeta, ctx: &dyn DiscoveryContext, ) -> bool
Called for every inbound raw packet before it enters the pipeline. Read more
Source§fn on_tick(&self, now: Instant, ctx: &dyn DiscoveryContext)
fn on_tick(&self, now: Instant, ctx: &dyn DiscoveryContext)
Periodic tick, called by the engine’s tick task at
tick_interval. Read moreSource§fn tick_interval(&self) -> Duration
fn tick_interval(&self) -> Duration
How often the engine should call
on_tick. Read moreAuto Trait Implementations§
impl !Freeze for EpidemicGossip
impl RefUnwindSafe for EpidemicGossip
impl Send for EpidemicGossip
impl Sync for EpidemicGossip
impl Unpin for EpidemicGossip
impl UnwindSafe for EpidemicGossip
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