GossipFactory

Trait GossipFactory 

Source
pub trait GossipFactory:
    'static
    + Send
    + Sync
    + Debug {
    // Required methods
    fn default_config(&self, config: &mut Config) -> K2Result<()>;
    fn validate_config(&self, config: &Config) -> K2Result<()>;
    fn create(
        &self,
        builder: Arc<Builder>,
        space_id: SpaceId,
        peer_store: DynPeerStore,
        local_agent_store: DynLocalAgentStore,
        peer_meta_store: DynPeerMetaStore,
        op_store: DynOpStore,
        transport: DynTransport,
        fetch: DynFetch,
    ) -> BoxFut<'static, K2Result<DynGossip>>;
}
Expand description

A factory for constructing Gossip instances.

Required Methods§

Source

fn default_config(&self, config: &mut Config) -> K2Result<()>

Help the builder construct a default config from the chosen module factories.

Source

fn validate_config(&self, config: &Config) -> K2Result<()>

Validate configuration.

Source

fn create( &self, builder: Arc<Builder>, space_id: SpaceId, peer_store: DynPeerStore, local_agent_store: DynLocalAgentStore, peer_meta_store: DynPeerMetaStore, op_store: DynOpStore, transport: DynTransport, fetch: DynFetch, ) -> BoxFut<'static, K2Result<DynGossip>>

Construct a gossip instance.

Implementors§