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§
Sourcefn default_config(&self, config: &mut Config) -> K2Result<()>
fn default_config(&self, config: &mut Config) -> K2Result<()>
Help the builder construct a default config from the chosen module factories.
Sourcefn validate_config(&self, config: &Config) -> K2Result<()>
fn validate_config(&self, config: &Config) -> K2Result<()>
Validate configuration.
Sourcefn 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>>
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.