Trait holochain::prelude::kitsune_p2p::actor::KitsuneP2pSender
source · pub trait KitsuneP2pSender: GhostChannelSender<KitsuneP2p> {
fn list_transport_bindings(
&self
) -> MustBoxFuture<'static, Result<Vec<Url2, Global>, KitsuneP2pError>> ⓘ { ... }
fn join(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>,
initial_arc: Option<DhtArc>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ { ... }
fn leave(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ { ... }
fn rpc_single(
&self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8, Global>,
timeout_ms: Option<u64>
) -> MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>> ⓘ { ... }
fn rpc_multi(
&self,
input: RpcMulti
) -> MustBoxFuture<'static, Result<Vec<RpcMultiResponse, Global>, KitsuneP2pError>> ⓘ { ... }
fn broadcast(
&self,
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>,
timeout: KitsuneTimeout,
data: BroadcastData
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ { ... }
fn targeted_broadcast(
&self,
space: Arc<KitsuneSpace>,
agents: Vec<Arc<KitsuneAgent>, Global>,
timeout: KitsuneTimeout,
payload: Vec<u8, Global>,
drop_at_limit: bool
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ { ... }
fn new_integrated_data(
&self,
space: Arc<KitsuneSpace>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ { ... }
fn authority_for_hash(
&self,
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>
) -> MustBoxFuture<'static, Result<bool, KitsuneP2pError>> ⓘ { ... }
fn dump_network_metrics(
&self,
space: Option<Arc<KitsuneSpace>>
) -> MustBoxFuture<'static, Result<Value, KitsuneP2pError>> ⓘ { ... }
fn get_diagnostics(
&self,
space: Arc<KitsuneSpace>
) -> MustBoxFuture<'static, Result<KitsuneDiagnostics, KitsuneP2pError>> ⓘ { ... }
}
Expand description
The KitsuneP2pSender allows async remote-control of the KitsuneP2p actor.
Provided Methods§
sourcefn list_transport_bindings(
&self
) -> MustBoxFuture<'static, Result<Vec<Url2, Global>, KitsuneP2pError>> ⓘ
fn list_transport_bindings(
&self
) -> MustBoxFuture<'static, Result<Vec<Url2, Global>, KitsuneP2pError>> ⓘ
Get the calculated transport bindings.
sourcefn join(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>,
initial_arc: Option<DhtArc>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
fn join(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>,
initial_arc: Option<DhtArc>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
Announce a space/agent pair on this network.
sourcefn leave(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
fn leave(
&self,
space: Arc<KitsuneSpace>,
agent: Arc<KitsuneAgent>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
Withdraw this space/agent pair from this network.
sourcefn rpc_single(
&self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8, Global>,
timeout_ms: Option<u64>
) -> MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>> ⓘ
fn rpc_single(
&self,
space: Arc<KitsuneSpace>,
to_agent: Arc<KitsuneAgent>,
payload: Vec<u8, Global>,
timeout_ms: Option<u64>
) -> MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>> ⓘ
Make a request of a single remote agent, expecting a response. The remote side will receive a “Call” event.
sourcefn rpc_multi(
&self,
input: RpcMulti
) -> MustBoxFuture<'static, Result<Vec<RpcMultiResponse, Global>, KitsuneP2pError>> ⓘ
fn rpc_multi(
&self,
input: RpcMulti
) -> MustBoxFuture<'static, Result<Vec<RpcMultiResponse, Global>, KitsuneP2pError>> ⓘ
Make a request to multiple destination agents - awaiting/aggregating the responses. The remote sides will see these messages as “Call” events. NOTE: We’ve currently disabled the “multi” part of this. It will still pick appropriate peers by basis, but will only make requests one at a time, returning the first success.
sourcefn broadcast(
&self,
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>,
timeout: KitsuneTimeout,
data: BroadcastData
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
fn broadcast(
&self,
space: Arc<KitsuneSpace>,
basis: Arc<KitsuneBasis>,
timeout: KitsuneTimeout,
data: BroadcastData
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
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.
sourcefn targeted_broadcast(
&self,
space: Arc<KitsuneSpace>,
agents: Vec<Arc<KitsuneAgent>, Global>,
timeout: KitsuneTimeout,
payload: Vec<u8, Global>,
drop_at_limit: bool
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
fn targeted_broadcast(
&self,
space: Arc<KitsuneSpace>,
agents: Vec<Arc<KitsuneAgent>, Global>,
timeout: KitsuneTimeout,
payload: Vec<u8, Global>,
drop_at_limit: bool
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
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.
sourcefn new_integrated_data(
&self,
space: Arc<KitsuneSpace>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
fn new_integrated_data(
&self,
space: Arc<KitsuneSpace>
) -> MustBoxFuture<'static, Result<(), KitsuneP2pError>> ⓘ
New data has been integrated and is ready for gossiping.
Check if an agent is an authority for a hash.
sourcefn dump_network_metrics(
&self,
space: Option<Arc<KitsuneSpace>>
) -> MustBoxFuture<'static, Result<Value, KitsuneP2pError>> ⓘ
fn dump_network_metrics(
&self,
space: Option<Arc<KitsuneSpace>>
) -> MustBoxFuture<'static, Result<Value, KitsuneP2pError>> ⓘ
dump network metrics
sourcefn get_diagnostics(
&self,
space: Arc<KitsuneSpace>
) -> MustBoxFuture<'static, Result<KitsuneDiagnostics, KitsuneP2pError>> ⓘ
fn get_diagnostics(
&self,
space: Arc<KitsuneSpace>
) -> MustBoxFuture<'static, Result<KitsuneDiagnostics, KitsuneP2pError>> ⓘ
Get data for diagnostics