Trait Gossip

Source
pub trait Gossip:
    'static
    + Send
    + Sync
    + Debug {
    // Required methods
    fn inform_ops_stored(&self, ops: Vec<StoredOp>) -> BoxFut<'_, K2Result<()>>;
    fn get_state_summary(
        &self,
        request: GossipStateSummaryRequest,
    ) -> BoxFut<'_, K2Result<GossipStateSummary>>;
}
Expand description

Represents the ability to sync DHT data with other agents through background communication.

Required Methods§

Source

fn inform_ops_stored(&self, ops: Vec<StoredOp>) -> BoxFut<'_, K2Result<()>>

Inform the gossip module that a set of ops have been stored.

This is not expected to be called directly. It is intended to be used by the space that owns this gossip module. See crate::space::Space::inform_ops_stored.

Source

fn get_state_summary( &self, request: GossipStateSummaryRequest, ) -> BoxFut<'_, K2Result<GossipStateSummary>>

Get a state summary from the gossip module.

Implementors§