Trait holochain_p2p::HolochainP2pSender
source · pub trait HolochainP2pSender: GhostChannelSender<HolochainP2p> {
Show 19 methods
// Provided methods
fn join(
&self,
dna_hash: DnaHash,
agent_pub_key: AgentPubKey,
maybe_agent_info: Option<AgentInfoSigned>,
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,
signature: Signature,
to_agent: AgentPubKey,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> HolochainP2pFuture<SerializedBytes> { ... }
fn remote_signal(
&self,
dna_hash: DnaHash,
from_agent: AgentPubKey,
to_agent_list: Vec<(Signature, AgentPubKey)>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> HolochainP2pFuture<()> { ... }
fn publish(
&self,
dna_hash: DnaHash,
request_validation_receipt: bool,
countersigning_session: bool,
basis_hash: OpBasis,
source: AgentPubKey,
op_hash_list: Vec<OpHashSized>,
timeout_ms: Option<u64>,
reflect_ops: Option<Vec<DhtOp>>
) -> HolochainP2pFuture<()> { ... }
fn publish_countersign(
&self,
dna_hash: DnaHash,
flag: bool,
basis_hash: OpBasis,
op: DhtOp
) -> HolochainP2pFuture<()> { ... }
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 count_links(
&self,
dna_hash: DnaHash,
query: WireLinkQuery
) -> HolochainP2pFuture<CountLinksResponse> { ... }
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_receipts(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
receipts: ValidationReceiptBundle
) -> HolochainP2pFuture<()> { ... }
fn new_integrated_data(&self, dna_hash: DnaHash) -> HolochainP2pFuture<()> { ... }
fn authority_for_hash(
&self,
dna_hash: DnaHash,
basis: OpBasis
) -> 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> { ... }
fn dump_network_stats(&self) -> HolochainP2pFuture<String> { ... }
fn get_diagnostics(
&self,
dna_hash: DnaHash
) -> HolochainP2pFuture<KitsuneDiagnostics> { ... }
}
Expand description
The HolochainP2pSender struct allows controlling the HolochainP2p actor instance.
Provided Methods§
sourcefn join(
&self,
dna_hash: DnaHash,
agent_pub_key: AgentPubKey,
maybe_agent_info: Option<AgentInfoSigned>,
initial_arc: Option<DhtArc>
) -> HolochainP2pFuture<()>
fn join( &self, dna_hash: DnaHash, agent_pub_key: AgentPubKey, maybe_agent_info: Option<AgentInfoSigned>, 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,
signature: Signature,
to_agent: AgentPubKey,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> HolochainP2pFuture<SerializedBytes>
fn call_remote( &self, dna_hash: DnaHash, from_agent: AgentPubKey, signature: Signature, to_agent: AgentPubKey, zome_name: ZomeName, fn_name: FunctionName, cap_secret: Option<CapSecret>, payload: ExternIO, nonce: Nonce256Bits, expires_at: Timestamp ) -> 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<(Signature, AgentPubKey)>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> HolochainP2pFuture<()>
fn remote_signal( &self, dna_hash: DnaHash, from_agent: AgentPubKey, to_agent_list: Vec<(Signature, AgentPubKey)>, zome_name: ZomeName, fn_name: FunctionName, cap: Option<CapSecret>, payload: ExternIO, nonce: Nonce256Bits, expires_at: Timestamp ) -> 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.
sourcefn publish(
&self,
dna_hash: DnaHash,
request_validation_receipt: bool,
countersigning_session: bool,
basis_hash: OpBasis,
source: AgentPubKey,
op_hash_list: Vec<OpHashSized>,
timeout_ms: Option<u64>,
reflect_ops: Option<Vec<DhtOp>>
) -> HolochainP2pFuture<()>
fn publish( &self, dna_hash: DnaHash, request_validation_receipt: bool, countersigning_session: bool, basis_hash: OpBasis, source: AgentPubKey, op_hash_list: Vec<OpHashSized>, timeout_ms: Option<u64>, reflect_ops: Option<Vec<DhtOp>> ) -> HolochainP2pFuture<()>
Publish data to the correct neighborhood.
sourcefn publish_countersign(
&self,
dna_hash: DnaHash,
flag: bool,
basis_hash: OpBasis,
op: DhtOp
) -> HolochainP2pFuture<()>
fn publish_countersign( &self, dna_hash: DnaHash, flag: bool, basis_hash: OpBasis, op: DhtOp ) -> HolochainP2pFuture<()>
Publish a countersigning op.
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 count_links(
&self,
dna_hash: DnaHash,
query: WireLinkQuery
) -> HolochainP2pFuture<CountLinksResponse>
fn count_links( &self, dna_hash: DnaHash, query: WireLinkQuery ) -> HolochainP2pFuture<CountLinksResponse>
Get a count of 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_receipts(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
receipts: ValidationReceiptBundle
) -> HolochainP2pFuture<()>
fn send_validation_receipts( &self, dna_hash: DnaHash, to_agent: AgentPubKey, receipts: ValidationReceiptBundle ) -> 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.
sourcefn dump_network_stats(&self) -> HolochainP2pFuture<String>
fn dump_network_stats(&self) -> HolochainP2pFuture<String>
Dump network stats.
sourcefn get_diagnostics(
&self,
dna_hash: DnaHash
) -> HolochainP2pFuture<KitsuneDiagnostics>
fn get_diagnostics( &self, dna_hash: DnaHash ) -> HolochainP2pFuture<KitsuneDiagnostics>
Get struct for diagnostic data