Trait holochain_p2p::HolochainP2pSender
source · [−]pub trait HolochainP2pSender: GhostChannelSender<HolochainP2p> {
Show 15 methods
fn join(
&self,
dna_hash: DnaHash,
agent_pub_key: AgentPubKey,
initial_arc: Option<DhtArc>
) -> HolochainP2pFuture<()> { ... }
fn leave(
&self,
dna_hash: DnaHash,
agent_pub_key: AgentPubKey
) -> HolochainP2pFuture<()> { ... }
fn call_remote(
&self,
dna_hash: DnaHash,
from_agent: AgentPubKey,
to_agent: AgentPubKey,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO
) -> HolochainP2pFuture<SerializedBytes> { ... }
fn remote_signal(
&self,
dna_hash: DnaHash,
from_agent: AgentPubKey,
to_agent_list: Vec<AgentPubKey>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO
) -> HolochainP2pFuture<()> { ... }
fn publish(
&self,
dna_hash: DnaHash,
request_validation_receipt: bool,
countersigning_session: bool,
dht_hash: AnyDhtHash,
ops: Vec<DhtOp>,
timeout_ms: Option<u64>
) -> HolochainP2pFuture<usize> { ... }
fn get(
&self,
dna_hash: DnaHash,
dht_hash: AnyDhtHash,
options: GetOptions
) -> HolochainP2pFuture<Vec<WireOps>> { ... }
fn get_meta(
&self,
dna_hash: DnaHash,
dht_hash: AnyDhtHash,
options: GetMetaOptions
) -> HolochainP2pFuture<Vec<MetadataSet>> { ... }
fn get_links(
&self,
dna_hash: DnaHash,
link_key: WireLinkKey,
options: GetLinksOptions
) -> HolochainP2pFuture<Vec<WireLinkOps>> { ... }
fn get_agent_activity(
&self,
dna_hash: DnaHash,
agent: AgentPubKey,
query: ChainQueryFilter,
options: GetActivityOptions
) -> HolochainP2pFuture<Vec<AgentActivityResponse<ActionHash>>> { ... }
fn must_get_agent_activity(
&self,
dna_hash: DnaHash,
author: AgentPubKey,
filter: ChainFilter
) -> HolochainP2pFuture<Vec<MustGetAgentActivityResponse>> { ... }
fn send_validation_receipt(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
receipt: SerializedBytes
) -> HolochainP2pFuture<()> { ... }
fn new_integrated_data(&self, dna_hash: DnaHash) -> HolochainP2pFuture<()> { ... }
fn authority_for_hash(
&self,
dna_hash: DnaHash,
dht_hash: AnyDhtHash
) -> HolochainP2pFuture<bool> { ... }
fn countersigning_session_negotiation(
&self,
dna_hash: DnaHash,
agents: Vec<AgentPubKey>,
message: CountersigningSessionNegotiationMessage
) -> HolochainP2pFuture<()> { ... }
fn dump_network_metrics(
&self,
dna_hash: Option<DnaHash>
) -> HolochainP2pFuture<String> { ... }
}
Expand description
The HolochainP2pSender struct allows controlling the HolochainP2p actor instance.
Provided Methods
sourcefn join(
&self,
dna_hash: DnaHash,
agent_pub_key: AgentPubKey,
initial_arc: Option<DhtArc>
) -> HolochainP2pFuture<()>
fn join(
&self,
dna_hash: DnaHash,
agent_pub_key: AgentPubKey,
initial_arc: Option<DhtArc>
) -> HolochainP2pFuture<()>
The p2p module must be informed at runtime which dna/agent pairs it should be tracking.
sourcefn leave(
&self,
dna_hash: DnaHash,
agent_pub_key: AgentPubKey
) -> HolochainP2pFuture<()>
fn leave(
&self,
dna_hash: DnaHash,
agent_pub_key: AgentPubKey
) -> HolochainP2pFuture<()>
If a cell is disabled, we’ll need to "leave" the network module as well.
sourcefn call_remote(
&self,
dna_hash: DnaHash,
from_agent: AgentPubKey,
to_agent: AgentPubKey,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO
) -> HolochainP2pFuture<SerializedBytes>
fn call_remote(
&self,
dna_hash: DnaHash,
from_agent: AgentPubKey,
to_agent: AgentPubKey,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO
) -> HolochainP2pFuture<SerializedBytes>
Invoke a zome function on a remote node (if you have been granted the capability).
sourcefn remote_signal(
&self,
dna_hash: DnaHash,
from_agent: AgentPubKey,
to_agent_list: Vec<AgentPubKey>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO
) -> HolochainP2pFuture<()>
fn remote_signal(
&self,
dna_hash: DnaHash,
from_agent: AgentPubKey,
to_agent_list: Vec<AgentPubKey>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO
) -> HolochainP2pFuture<()>
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.
Publish data to the correct neighborhood.
sourcefn get(
&self,
dna_hash: DnaHash,
dht_hash: AnyDhtHash,
options: GetOptions
) -> HolochainP2pFuture<Vec<WireOps>>
fn get(
&self,
dna_hash: DnaHash,
dht_hash: AnyDhtHash,
options: GetOptions
) -> HolochainP2pFuture<Vec<WireOps>>
Get an entry from the DHT.
sourcefn get_meta(
&self,
dna_hash: DnaHash,
dht_hash: AnyDhtHash,
options: GetMetaOptions
) -> HolochainP2pFuture<Vec<MetadataSet>>
fn get_meta(
&self,
dna_hash: DnaHash,
dht_hash: AnyDhtHash,
options: GetMetaOptions
) -> HolochainP2pFuture<Vec<MetadataSet>>
Get metadata from the DHT.
sourcefn get_links(
&self,
dna_hash: DnaHash,
link_key: WireLinkKey,
options: GetLinksOptions
) -> HolochainP2pFuture<Vec<WireLinkOps>>
fn get_links(
&self,
dna_hash: DnaHash,
link_key: WireLinkKey,
options: GetLinksOptions
) -> HolochainP2pFuture<Vec<WireLinkOps>>
Get links from the DHT.
sourcefn get_agent_activity(
&self,
dna_hash: DnaHash,
agent: AgentPubKey,
query: ChainQueryFilter,
options: GetActivityOptions
) -> HolochainP2pFuture<Vec<AgentActivityResponse<ActionHash>>>
fn get_agent_activity(
&self,
dna_hash: DnaHash,
agent: AgentPubKey,
query: ChainQueryFilter,
options: GetActivityOptions
) -> HolochainP2pFuture<Vec<AgentActivityResponse<ActionHash>>>
Get agent activity from the DHT.
sourcefn must_get_agent_activity(
&self,
dna_hash: DnaHash,
author: AgentPubKey,
filter: ChainFilter
) -> HolochainP2pFuture<Vec<MustGetAgentActivityResponse>>
fn must_get_agent_activity(
&self,
dna_hash: DnaHash,
author: AgentPubKey,
filter: ChainFilter
) -> HolochainP2pFuture<Vec<MustGetAgentActivityResponse>>
A remote node is requesting agent activity from us.
sourcefn send_validation_receipt(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
receipt: SerializedBytes
) -> HolochainP2pFuture<()>
fn send_validation_receipt(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
receipt: SerializedBytes
) -> HolochainP2pFuture<()>
Send a validation receipt to a remote node.
sourcefn new_integrated_data(&self, dna_hash: DnaHash) -> HolochainP2pFuture<()>
fn new_integrated_data(&self, dna_hash: DnaHash) -> HolochainP2pFuture<()>
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: DnaHash,
agents: Vec<AgentPubKey>,
message: CountersigningSessionNegotiationMessage
) -> HolochainP2pFuture<()>
fn countersigning_session_negotiation(
&self,
dna_hash: DnaHash,
agents: Vec<AgentPubKey>,
message: CountersigningSessionNegotiationMessage
) -> HolochainP2pFuture<()>
Messages between agents negotiation a countersigning session.
sourcefn dump_network_metrics(
&self,
dna_hash: Option<DnaHash>
) -> HolochainP2pFuture<String>
fn dump_network_metrics(
&self,
dna_hash: Option<DnaHash>
) -> HolochainP2pFuture<String>
Dump network metrics.