Trait kitsune_p2p::event::KitsuneP2pEventHandler[][src]

pub trait KitsuneP2pEventHandler: GhostHandler<KitsuneP2pEvent> {
    fn handle_put_agent_info_signed(
        &mut self,
        input: PutAgentInfoSignedEvt
    ) -> KitsuneP2pEventHandlerResult<()>;
fn handle_get_agent_info_signed(
        &mut self,
        input: GetAgentInfoSignedEvt
    ) -> KitsuneP2pEventHandlerResult<Option<AgentInfoSigned>>;
fn handle_query_agents(
        &mut self,
        input: QueryAgentsEvt
    ) -> KitsuneP2pEventHandlerResult<Vec<AgentInfoSigned>>;
fn handle_query_peer_density(
        &mut self,
        space: Arc<KitsuneSpace>,
        dht_arc: DhtArc
    ) -> KitsuneP2pEventHandlerResult<PeerDensity>;
fn handle_put_metric_datum(
        &mut self,
        datum: MetricDatum
    ) -> KitsuneP2pEventHandlerResult<()>;
fn handle_query_metrics(
        &mut self,
        query: MetricQuery
    ) -> KitsuneP2pEventHandlerResult<MetricQueryAnswer>;
fn handle_call(
        &mut self,
        space: Arc<KitsuneSpace>,
        to_agent: Arc<KitsuneAgent>,
        from_agent: Arc<KitsuneAgent>,
        payload: Vec<u8>
    ) -> KitsuneP2pEventHandlerResult<Vec<u8>>;
fn handle_notify(
        &mut self,
        space: Arc<KitsuneSpace>,
        to_agent: Arc<KitsuneAgent>,
        from_agent: Arc<KitsuneAgent>,
        payload: Vec<u8>
    ) -> KitsuneP2pEventHandlerResult<()>;
fn handle_gossip(
        &mut self,
        space: Arc<KitsuneSpace>,
        to_agent: Arc<KitsuneAgent>,
        ops: Vec<(Arc<KitsuneOpHash>, Vec<u8>)>
    ) -> KitsuneP2pEventHandlerResult<()>;
fn handle_query_op_hashes(
        &mut self,
        input: QueryOpHashesEvt
    ) -> KitsuneP2pEventHandlerResult<Option<(Vec<Arc<KitsuneOpHash>>, TimeWindow)>>;
fn handle_fetch_op_data(
        &mut self,
        input: FetchOpDataEvt
    ) -> KitsuneP2pEventHandlerResult<Vec<(Arc<KitsuneOpHash>, Vec<u8>)>>;
fn handle_sign_network_data(
        &mut self,
        input: SignNetworkDataEvt
    ) -> KitsuneP2pEventHandlerResult<KitsuneSignature>; }
Expand description

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

Required methods

We need to store signed agent info.

We need to get previously stored agent info.

We need to get previously stored agent info.

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

Record a metric datum about an agent.

Ask for metric data.

We are receiving a request from a remote node.

We are receiving a notification from a remote node.

We are receiving a dht op we may need to hold distributed via gossip.

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.

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

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

Implementors