Trait kitsune_p2p::actor::KitsuneP2pSender
source · [−]pub trait KitsuneP2pSender: GhostChannelSender<KitsuneP2p> {
fn list_transport_bindings(&self) -> KitsuneP2pFuture<Vec<Url2>> { ... }
fn join(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>,
initial_arc: Option<DhtArc>
) -> KitsuneP2pFuture<()> { ... }
fn leave(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>
) -> KitsuneP2pFuture<()> { ... }
fn rpc_single(
&self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8>,
timeout_ms: Option<u64>
) -> KitsuneP2pFuture<Vec<u8>> { ... }
fn rpc_multi(
&self,
input: RpcMulti
) -> KitsuneP2pFuture<Vec<RpcMultiResponse>> { ... }
fn broadcast(
&self,
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>,
timeout: KitsuneTimeout,
destination: BroadcastTo,
payload: Vec<u8>
) -> KitsuneP2pFuture<()> { ... }
fn targeted_broadcast(
&self,
space: Arc<KitsuneSpace>,
agents: Vec<Arc<KitsuneAgent>>,
timeout: KitsuneTimeout,
payload: Vec<u8>,
drop_at_limit: bool
) -> KitsuneP2pFuture<()> { ... }
fn new_integrated_data(
&self,
space: Arc<KitsuneSpace>
) -> KitsuneP2pFuture<()> { ... }
fn authority_for_hash(
&self,
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>
) -> KitsuneP2pFuture<bool> { ... }
fn dump_network_metrics(
&self,
space: Option<Arc<KitsuneSpace>>
) -> KitsuneP2pFuture<Value> { ... }
}
Expand description
The KitsuneP2pSender allows async remote-control of the KitsuneP2p actor.
Provided methods
fn list_transport_bindings(&self) -> KitsuneP2pFuture<Vec<Url2>>
fn list_transport_bindings(&self) -> KitsuneP2pFuture<Vec<Url2>>
Get the calculated transport bindings.
fn join(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>,
initial_arc: Option<DhtArc>
) -> KitsuneP2pFuture<()>
fn join(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>,
initial_arc: Option<DhtArc>
) -> KitsuneP2pFuture<()>
Announce a space/agent pair on this network.
fn leave(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>
) -> KitsuneP2pFuture<()>
fn leave(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>
) -> KitsuneP2pFuture<()>
Withdraw this space/agent pair from this network.
fn rpc_single(
&self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8>,
timeout_ms: Option<u64>
) -> KitsuneP2pFuture<Vec<u8>>
fn rpc_single(
&self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8>,
timeout_ms: Option<u64>
) -> KitsuneP2pFuture<Vec<u8>>
Make a request of a single remote agent, expecting a response. The remote side will receive a “Call” event.
fn rpc_multi(&self, input: RpcMulti) -> KitsuneP2pFuture<Vec<RpcMultiResponse>>
fn rpc_multi(&self, input: RpcMulti) -> KitsuneP2pFuture<Vec<RpcMultiResponse>>
Make a request to multiple destination agents - awaiting/aggregating the responses. The remote sides will see these messages as “Call” events.
fn broadcast(
&self,
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>,
timeout: KitsuneTimeout,
destination: BroadcastTo,
payload: Vec<u8>
) -> KitsuneP2pFuture<()>
fn broadcast(
&self,
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>,
timeout: KitsuneTimeout,
destination: BroadcastTo,
payload: Vec<u8>
) -> KitsuneP2pFuture<()>
Publish data to a “neighborhood” of remote nodes surrounding the “basis” hash. This is a multi-step fire-and-forget algorithm. An Ok(()) result only means that we were able to establish at least one connection with a node in the target neighborhood. The remote sides will see these messages as “Notify” events.
fn targeted_broadcast(
&self,
space: Arc<KitsuneSpace>,
agents: Vec<Arc<KitsuneAgent>>,
timeout: KitsuneTimeout,
payload: Vec<u8>,
drop_at_limit: bool
) -> KitsuneP2pFuture<()>
fn targeted_broadcast(
&self,
space: Arc<KitsuneSpace>,
agents: Vec<Arc<KitsuneAgent>>,
timeout: KitsuneTimeout,
payload: Vec<u8>,
drop_at_limit: bool
) -> KitsuneP2pFuture<()>
Broadcast data to a specific set of agents without expecting a response. An Ok(()) result only means that we were able to establish at least one connection with a node in the agent set.
fn new_integrated_data(&self, space: Arc<KitsuneSpace>) -> KitsuneP2pFuture<()>
fn new_integrated_data(&self, space: Arc<KitsuneSpace>) -> KitsuneP2pFuture<()>
New data has been integrated and is ready for gossiping.
Check if an agent is an authority for a hash.
fn dump_network_metrics(
&self,
space: Option<Arc<KitsuneSpace>>
) -> KitsuneP2pFuture<Value>
fn dump_network_metrics(
&self,
space: Option<Arc<KitsuneSpace>>
) -> KitsuneP2pFuture<Value>
dump network metrics