Trait holochain::prelude::kitsune_p2p::event::KitsuneP2pEventSender
source · 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, Global>, KitsuneP2pError>> ⓘ { ... }
fn query_peer_density(
&self,
space: Arc<KitsuneSpace, Global>,
dht_arc: DhtArc
) -> MustBoxFuture<'static, Result<PeerView, KitsuneP2pError>> ⓘ { ... }
fn call(
&self,
space: Arc<KitsuneSpace, Global>,
to_agent: Arc<KitsuneAgent, Global>,
payload: Vec<u8, Global>
) -> MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>> ⓘ { ... }
fn notify(
&self,
space: Arc<KitsuneSpace, Global>,
to_agent: Arc<KitsuneAgent, Global>,
payload: Vec<u8, Global>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ { ... }
fn receive_ops(
&self,
space: Arc<KitsuneSpace, Global>,
ops: Vec<Arc<KitsuneOpData, Global>, Global>,
context: Option<FetchContext>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ { ... }
fn query_op_hashes(
&self,
input: QueryOpHashesEvt
) -> MustBoxFuture<'static, Result<Option<(Vec<Arc<KitsuneOpHash, Global>, Global>, RangeInclusive<Timestamp>)>, KitsuneP2pError>> ⓘ { ... }
fn fetch_op_data(
&self,
input: FetchOpDataEvt
) -> MustBoxFuture<'static, Result<Vec<(Arc<KitsuneOpHash, Global>, Arc<KitsuneOpData, Global>), Global>, 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§
sourcefn put_agent_info_signed(
&self,
input: PutAgentInfoSignedEvt
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
fn put_agent_info_signed( &self, input: PutAgentInfoSignedEvt ) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
We need to store signed agent info.
sourcefn query_agents(
&self,
input: QueryAgentsEvt
) -> MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, KitsuneP2pError>> ⓘ
fn query_agents( &self, input: QueryAgentsEvt ) -> MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, KitsuneP2pError>> ⓘ
We need to get previously stored agent info.
sourcefn query_peer_density(
&self,
space: Arc<KitsuneSpace, Global>,
dht_arc: DhtArc
) -> MustBoxFuture<'static, Result<PeerView, KitsuneP2pError>> ⓘ
fn query_peer_density( &self, space: Arc<KitsuneSpace, Global>, dht_arc: DhtArc ) -> MustBoxFuture<'static, Result<PeerView, KitsuneP2pError>> ⓘ
Query the peer density of a space for a given [DhtArc
].
sourcefn call(
&self,
space: Arc<KitsuneSpace, Global>,
to_agent: Arc<KitsuneAgent, Global>,
payload: Vec<u8, Global>
) -> MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>> ⓘ
fn call( &self, space: Arc<KitsuneSpace, Global>, to_agent: Arc<KitsuneAgent, Global>, payload: Vec<u8, Global> ) -> MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>> ⓘ
We are receiving a request from a remote node.
sourcefn notify(
&self,
space: Arc<KitsuneSpace, Global>,
to_agent: Arc<KitsuneAgent, Global>,
payload: Vec<u8, Global>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
fn notify( &self, space: Arc<KitsuneSpace, Global>, to_agent: Arc<KitsuneAgent, Global>, payload: Vec<u8, Global> ) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
We are receiving a notification from a remote node.
sourcefn receive_ops(
&self,
space: Arc<KitsuneSpace, Global>,
ops: Vec<Arc<KitsuneOpData, Global>, Global>,
context: Option<FetchContext>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
fn receive_ops( &self, space: Arc<KitsuneSpace, Global>, ops: Vec<Arc<KitsuneOpData, Global>, Global>, context: Option<FetchContext> ) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
We have received ops to be integrated, either through gossip or publish.
sourcefn query_op_hashes(
&self,
input: QueryOpHashesEvt
) -> MustBoxFuture<'static, Result<Option<(Vec<Arc<KitsuneOpHash, Global>, Global>, RangeInclusive<Timestamp>)>, KitsuneP2pError>> ⓘ
fn query_op_hashes( &self, input: QueryOpHashesEvt ) -> MustBoxFuture<'static, Result<Option<(Vec<Arc<KitsuneOpHash, Global>, Global>, 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.
sourcefn fetch_op_data(
&self,
input: FetchOpDataEvt
) -> MustBoxFuture<'static, Result<Vec<(Arc<KitsuneOpHash, Global>, Arc<KitsuneOpData, Global>), Global>, KitsuneP2pError>> ⓘ
fn fetch_op_data( &self, input: FetchOpDataEvt ) -> MustBoxFuture<'static, Result<Vec<(Arc<KitsuneOpHash, Global>, Arc<KitsuneOpData, Global>), Global>, KitsuneP2pError>> ⓘ
Gather all op-hash data for a list of op-hashes from our implementor.
sourcefn sign_network_data(
&self,
input: SignNetworkDataEvt
) -> MustBoxFuture<'static, Result<KitsuneSignature, KitsuneP2pError>> ⓘ
fn sign_network_data( &self, input: SignNetworkDataEvt ) -> MustBoxFuture<'static, Result<KitsuneSignature, KitsuneP2pError>> ⓘ
Request that our implementor sign some data on behalf of an agent.