pub trait KitsuneP2pEventSender: GhostChannelSender<KitsuneP2pEvent> {
    // Provided methods
    fn put_agent_info_signed(
        &self,
        input: PutAgentInfoSignedEvt
    ) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>>  { ... }
    fn query_agents(
        &self,
        input: QueryAgentsEvt
    ) -> MustBoxFuture<'static, Result<Vec<AgentInfoSigned>, KitsuneP2pError>>  { ... }
    fn query_peer_density(
        &self,
        space: Arc<KitsuneSpace>,
        dht_arc: DhtArc
    ) -> MustBoxFuture<'static, Result<PeerView, KitsuneP2pError>>  { ... }
    fn call(
        &self,
        space: Arc<KitsuneSpace>,
        to_agent: Arc<KitsuneAgent>,
        payload: Vec<u8>
    ) -> MustBoxFuture<'static, Result<Vec<u8>, KitsuneP2pError>>  { ... }
    fn notify(
        &self,
        space: Arc<KitsuneSpace>,
        to_agent: Arc<KitsuneAgent>,
        payload: Vec<u8>
    ) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>>  { ... }
    fn receive_ops(
        &self,
        space: Arc<KitsuneSpace>,
        ops: Vec<Arc<KitsuneOpData>>,
        context: Option<FetchContext>
    ) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>>  { ... }
    fn query_op_hashes(
        &self,
        input: QueryOpHashesEvt
    ) -> MustBoxFuture<'static, Result<Option<(Vec<Arc<KitsuneOpHash>>, RangeInclusive<Timestamp>)>, KitsuneP2pError>>  { ... }
    fn fetch_op_data(
        &self,
        input: FetchOpDataEvt
    ) -> MustBoxFuture<'static, Result<Vec<(Arc<KitsuneOpHash>, Arc<KitsuneOpData>)>, KitsuneP2pError>>  { ... }
    fn sign_network_data(
        &self,
        input: SignNetworkDataEvt
    ) -> MustBoxFuture<'static, Result<KitsuneSignature, KitsuneP2pError>>  { ... }
}
Expand description

The KitsuneP2pEvent stream allows handling events generated from the KitsuneP2p actor.

Provided Methods§

source

fn put_agent_info_signed( &self, input: PutAgentInfoSignedEvt ) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>>

We need to store signed agent info.

source

fn query_agents( &self, input: QueryAgentsEvt ) -> MustBoxFuture<'static, Result<Vec<AgentInfoSigned>, KitsuneP2pError>>

We need to get previously stored agent info.

source

fn query_peer_density( &self, space: Arc<KitsuneSpace>, dht_arc: DhtArc ) -> MustBoxFuture<'static, Result<PeerView, KitsuneP2pError>>

Query the peer density of a space for a given [DhtArc].

source

fn call( &self, space: Arc<KitsuneSpace>, to_agent: Arc<KitsuneAgent>, payload: Vec<u8> ) -> MustBoxFuture<'static, Result<Vec<u8>, KitsuneP2pError>>

We are receiving a request from a remote node.

source

fn notify( &self, space: Arc<KitsuneSpace>, to_agent: Arc<KitsuneAgent>, payload: Vec<u8> ) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>>

We are receiving a notification from a remote node.

source

fn receive_ops( &self, space: Arc<KitsuneSpace>, ops: Vec<Arc<KitsuneOpData>>, context: Option<FetchContext> ) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>>

We have received ops to be integrated, either through gossip or publish.

source

fn query_op_hashes( &self, input: QueryOpHashesEvt ) -> MustBoxFuture<'static, Result<Option<(Vec<Arc<KitsuneOpHash>>, RangeInclusive<Timestamp>)>, KitsuneP2pError>>

Gather a list of op-hashes from our implementor that meet criteria. Get the oldest and newest times for ops within a time window and max number of ops.

source

fn fetch_op_data( &self, input: FetchOpDataEvt ) -> MustBoxFuture<'static, Result<Vec<(Arc<KitsuneOpHash>, Arc<KitsuneOpData>)>, KitsuneP2pError>>

Gather all op-hash data for a list of op-hashes from our implementor.

source

fn sign_network_data( &self, input: SignNetworkDataEvt ) -> MustBoxFuture<'static, Result<KitsuneSignature, KitsuneP2pError>>

Request that our implementor sign some data on behalf of an agent.

Object Safety§

This trait is not object safe.

Implementors§