Trait holochain::prelude::HolochainP2pSender
source · pub trait HolochainP2pSender: GhostChannelSender<HolochainP2p> {
Show 16 methods
fn join(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>,
initial_arc: Option<DhtArc>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn leave(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn call_remote(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent: HoloHash<Agent>,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO
) -> MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn remote_signal(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent_list: Vec<HoloHash<Agent>, Global>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn publish(
&self,
dna_hash: HoloHash<Dna>,
request_validation_receipt: bool,
countersigning_session: bool,
basis_hash: HoloHash<AnyLinkable>,
ops: Vec<DhtOp, Global>,
timeout_ms: Option<u64>
) -> MustBoxFuture<'static, Result<usize, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn get(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetOptions
) -> MustBoxFuture<'static, Result<Vec<WireOps, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn get_meta(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetMetaOptions
) -> MustBoxFuture<'static, Result<Vec<MetadataSet, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn get_links(
&self,
dna_hash: HoloHash<Dna>,
link_key: WireLinkKey,
options: GetLinksOptions
) -> MustBoxFuture<'static, Result<Vec<WireLinkOps, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn get_agent_activity(
&self,
dna_hash: HoloHash<Dna>,
agent: HoloHash<Agent>,
query: ChainQueryFilter,
options: GetActivityOptions
) -> MustBoxFuture<'static, Result<Vec<AgentActivityResponse<HoloHash<Action>>, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn must_get_agent_activity(
&self,
dna_hash: HoloHash<Dna>,
author: HoloHash<Agent>,
filter: ChainFilter<HoloHash<Action>>
) -> MustBoxFuture<'static, Result<Vec<MustGetAgentActivityResponse, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn send_validation_receipt(
&self,
dna_hash: HoloHash<Dna>,
to_agent: HoloHash<Agent>,
receipt: SerializedBytes
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn new_integrated_data(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn authority_for_hash(
&self,
dna_hash: HoloHash<Dna>,
basis: HoloHash<AnyLinkable>
) -> MustBoxFuture<'static, Result<bool, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn countersigning_session_negotiation(
&self,
dna_hash: HoloHash<Dna>,
agents: Vec<HoloHash<Agent>, Global>,
message: CountersigningSessionNegotiationMessage
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn dump_network_metrics(
&self,
dna_hash: Option<HoloHash<Dna>>
) -> MustBoxFuture<'static, Result<String, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
fn get_diagnostics(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<GossipDiagnostics, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
{ ... }
}
Expand description
The HolochainP2pSender struct allows controlling the HolochainP2p actor instance.
Provided Methods
sourcefn join(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>,
initial_arc: Option<DhtArc>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn join(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>,
initial_arc: Option<DhtArc>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
The p2p module must be informed at runtime which dna/agent pairs it should be tracking.
sourcefn leave(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn leave(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
If a cell is disabled, we’ll need to "leave" the network module as well.
sourcefn call_remote(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent: HoloHash<Agent>,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO
) -> MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn call_remote(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent: HoloHash<Agent>,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO
) -> MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Invoke a zome function on a remote node (if you have been granted the capability).
sourcefn remote_signal(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent_list: Vec<HoloHash<Agent>, Global>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn remote_signal(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent_list: Vec<HoloHash<Agent>, Global>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Invoke a zome function on a remote node (if you have been granted the capability). This is a fire-and-forget operation, a best effort will be made to forward the signal, but if the conductor network is overworked it may decide not to deliver some of the signals.
sourcefn publish(
&self,
dna_hash: HoloHash<Dna>,
request_validation_receipt: bool,
countersigning_session: bool,
basis_hash: HoloHash<AnyLinkable>,
ops: Vec<DhtOp, Global>,
timeout_ms: Option<u64>
) -> MustBoxFuture<'static, Result<usize, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn publish(
&self,
dna_hash: HoloHash<Dna>,
request_validation_receipt: bool,
countersigning_session: bool,
basis_hash: HoloHash<AnyLinkable>,
ops: Vec<DhtOp, Global>,
timeout_ms: Option<u64>
) -> MustBoxFuture<'static, Result<usize, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Publish data to the correct neighborhood.
sourcefn get(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetOptions
) -> MustBoxFuture<'static, Result<Vec<WireOps, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn get(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetOptions
) -> MustBoxFuture<'static, Result<Vec<WireOps, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Get an entry from the DHT.
sourcefn get_meta(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetMetaOptions
) -> MustBoxFuture<'static, Result<Vec<MetadataSet, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn get_meta(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetMetaOptions
) -> MustBoxFuture<'static, Result<Vec<MetadataSet, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Get metadata from the DHT.
sourcefn get_links(
&self,
dna_hash: HoloHash<Dna>,
link_key: WireLinkKey,
options: GetLinksOptions
) -> MustBoxFuture<'static, Result<Vec<WireLinkOps, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn get_links(
&self,
dna_hash: HoloHash<Dna>,
link_key: WireLinkKey,
options: GetLinksOptions
) -> MustBoxFuture<'static, Result<Vec<WireLinkOps, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Get links from the DHT.
sourcefn get_agent_activity(
&self,
dna_hash: HoloHash<Dna>,
agent: HoloHash<Agent>,
query: ChainQueryFilter,
options: GetActivityOptions
) -> MustBoxFuture<'static, Result<Vec<AgentActivityResponse<HoloHash<Action>>, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn get_agent_activity(
&self,
dna_hash: HoloHash<Dna>,
agent: HoloHash<Agent>,
query: ChainQueryFilter,
options: GetActivityOptions
) -> MustBoxFuture<'static, Result<Vec<AgentActivityResponse<HoloHash<Action>>, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Get agent activity from the DHT.
sourcefn must_get_agent_activity(
&self,
dna_hash: HoloHash<Dna>,
author: HoloHash<Agent>,
filter: ChainFilter<HoloHash<Action>>
) -> MustBoxFuture<'static, Result<Vec<MustGetAgentActivityResponse, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn must_get_agent_activity(
&self,
dna_hash: HoloHash<Dna>,
author: HoloHash<Agent>,
filter: ChainFilter<HoloHash<Action>>
) -> MustBoxFuture<'static, Result<Vec<MustGetAgentActivityResponse, Global>, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
A remote node is requesting agent activity from us.
sourcefn send_validation_receipt(
&self,
dna_hash: HoloHash<Dna>,
to_agent: HoloHash<Agent>,
receipt: SerializedBytes
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn send_validation_receipt(
&self,
dna_hash: HoloHash<Dna>,
to_agent: HoloHash<Agent>,
receipt: SerializedBytes
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Send a validation receipt to a remote node.
sourcefn new_integrated_data(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn new_integrated_data(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
New data has been integrated and is ready for gossiping.
Check if any local agent in this space is an authority for a hash.
sourcefn countersigning_session_negotiation(
&self,
dna_hash: HoloHash<Dna>,
agents: Vec<HoloHash<Agent>, Global>,
message: CountersigningSessionNegotiationMessage
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn countersigning_session_negotiation(
&self,
dna_hash: HoloHash<Dna>,
agents: Vec<HoloHash<Agent>, Global>,
message: CountersigningSessionNegotiationMessage
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Messages between agents negotiation a countersigning session.
sourcefn dump_network_metrics(
&self,
dna_hash: Option<HoloHash<Dna>>
) -> MustBoxFuture<'static, Result<String, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn dump_network_metrics(
&self,
dna_hash: Option<HoloHash<Dna>>
) -> MustBoxFuture<'static, Result<String, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Dump network metrics.
sourcefn get_diagnostics(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<GossipDiagnostics, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn get_diagnostics(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<GossipDiagnostics, HolochainP2pError>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Get struct for diagnostic data