Trait holochain::prelude::actor::HolochainP2pSender
source · pub trait HolochainP2pSender: GhostChannelSender<HolochainP2p> {
Show 17 methods
fn join(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>,
initial_arc: Option<DhtArc>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ { ... }
fn leave(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ { ... }
fn call_remote(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
signature: Signature,
to_agent: HoloHash<Agent>,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>> ⓘ { ... }
fn remote_signal(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent_list: Vec<(Signature, HoloHash<Agent>), Global>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ { ... }
fn publish(
&self,
dna_hash: HoloHash<Dna>,
request_validation_receipt: bool,
countersigning_session: bool,
basis_hash: HoloHash<AnyLinkable>,
source: HoloHash<Agent>,
op_hash_list: Vec<RoughSized<Arc<KitsuneOpHash>>, Global>,
timeout_ms: Option<u64>,
reflect_ops: Option<Vec<DhtOp, Global>>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ { ... }
fn publish_countersign(
&self,
dna_hash: HoloHash<Dna>,
flag: bool,
basis_hash: HoloHash<AnyLinkable>,
op: DhtOp
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ { ... }
fn get(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetOptions
) -> MustBoxFuture<'static, Result<Vec<WireOps, Global>, HolochainP2pError>> ⓘ { ... }
fn get_meta(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetMetaOptions
) -> MustBoxFuture<'static, Result<Vec<MetadataSet, Global>, HolochainP2pError>> ⓘ { ... }
fn get_links(
&self,
dna_hash: HoloHash<Dna>,
link_key: WireLinkKey,
options: GetLinksOptions
) -> MustBoxFuture<'static, Result<Vec<WireLinkOps, Global>, HolochainP2pError>> ⓘ { ... }
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>> ⓘ { ... }
fn must_get_agent_activity(
&self,
dna_hash: HoloHash<Dna>,
author: HoloHash<Agent>,
filter: ChainFilter<HoloHash<Action>>
) -> MustBoxFuture<'static, Result<Vec<MustGetAgentActivityResponse, Global>, HolochainP2pError>> ⓘ { ... }
fn send_validation_receipt(
&self,
dna_hash: HoloHash<Dna>,
to_agent: HoloHash<Agent>,
receipt: SerializedBytes
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ { ... }
fn new_integrated_data(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ { ... }
fn authority_for_hash(
&self,
dna_hash: HoloHash<Dna>,
basis: HoloHash<AnyLinkable>
) -> MustBoxFuture<'static, Result<bool, HolochainP2pError>> ⓘ { ... }
fn countersigning_session_negotiation(
&self,
dna_hash: HoloHash<Dna>,
agents: Vec<HoloHash<Agent>, Global>,
message: CountersigningSessionNegotiationMessage
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ { ... }
fn dump_network_metrics(
&self,
dna_hash: Option<HoloHash<Dna>>
) -> MustBoxFuture<'static, Result<String, HolochainP2pError>> ⓘ { ... }
fn get_diagnostics(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<KitsuneDiagnostics, HolochainP2pError>> ⓘ { ... }
}
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>> ⓘ
fn join(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>,
initial_arc: Option<DhtArc>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
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>> ⓘ
fn leave(
&self,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
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>,
signature: Signature,
to_agent: HoloHash<Agent>,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>> ⓘ
fn call_remote(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
signature: Signature,
to_agent: HoloHash<Agent>,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>> ⓘ
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<(Signature, HoloHash<Agent>), Global>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
fn remote_signal(
&self,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent_list: Vec<(Signature, HoloHash<Agent>), Global>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
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>,
source: HoloHash<Agent>,
op_hash_list: Vec<RoughSized<Arc<KitsuneOpHash>>, Global>,
timeout_ms: Option<u64>,
reflect_ops: Option<Vec<DhtOp, Global>>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
fn publish(
&self,
dna_hash: HoloHash<Dna>,
request_validation_receipt: bool,
countersigning_session: bool,
basis_hash: HoloHash<AnyLinkable>,
source: HoloHash<Agent>,
op_hash_list: Vec<RoughSized<Arc<KitsuneOpHash>>, Global>,
timeout_ms: Option<u64>,
reflect_ops: Option<Vec<DhtOp, Global>>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
Publish data to the correct neighborhood.
sourcefn publish_countersign(
&self,
dna_hash: HoloHash<Dna>,
flag: bool,
basis_hash: HoloHash<AnyLinkable>,
op: DhtOp
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
fn publish_countersign(
&self,
dna_hash: HoloHash<Dna>,
flag: bool,
basis_hash: HoloHash<AnyLinkable>,
op: DhtOp
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
Publish a countersigning op.
sourcefn get(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetOptions
) -> MustBoxFuture<'static, Result<Vec<WireOps, Global>, HolochainP2pError>> ⓘ
fn get(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetOptions
) -> MustBoxFuture<'static, Result<Vec<WireOps, Global>, HolochainP2pError>> ⓘ
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>> ⓘ
fn get_meta(
&self,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetMetaOptions
) -> MustBoxFuture<'static, Result<Vec<MetadataSet, Global>, HolochainP2pError>> ⓘ
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>> ⓘ
fn get_links(
&self,
dna_hash: HoloHash<Dna>,
link_key: WireLinkKey,
options: GetLinksOptions
) -> MustBoxFuture<'static, Result<Vec<WireLinkOps, Global>, HolochainP2pError>> ⓘ
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>> ⓘ
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>> ⓘ
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>> ⓘ
fn must_get_agent_activity(
&self,
dna_hash: HoloHash<Dna>,
author: HoloHash<Agent>,
filter: ChainFilter<HoloHash<Action>>
) -> MustBoxFuture<'static, Result<Vec<MustGetAgentActivityResponse, Global>, HolochainP2pError>> ⓘ
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>> ⓘ
fn send_validation_receipt(
&self,
dna_hash: HoloHash<Dna>,
to_agent: HoloHash<Agent>,
receipt: SerializedBytes
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
Send a validation receipt to a remote node.
sourcefn new_integrated_data(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
fn new_integrated_data(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
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>> ⓘ
fn countersigning_session_negotiation(
&self,
dna_hash: HoloHash<Dna>,
agents: Vec<HoloHash<Agent>, Global>,
message: CountersigningSessionNegotiationMessage
) -> MustBoxFuture<'static, Result<(), HolochainP2pError>> ⓘ
Messages between agents negotiation a countersigning session.
sourcefn dump_network_metrics(
&self,
dna_hash: Option<HoloHash<Dna>>
) -> MustBoxFuture<'static, Result<String, HolochainP2pError>> ⓘ
fn dump_network_metrics(
&self,
dna_hash: Option<HoloHash<Dna>>
) -> MustBoxFuture<'static, Result<String, HolochainP2pError>> ⓘ
Dump network metrics.
sourcefn get_diagnostics(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<KitsuneDiagnostics, HolochainP2pError>> ⓘ
fn get_diagnostics(
&self,
dna_hash: HoloHash<Dna>
) -> MustBoxFuture<'static, Result<KitsuneDiagnostics, HolochainP2pError>> ⓘ
Get struct for diagnostic data