Trait holochain_p2p::event::HolochainP2pEventSender
source · [−]pub trait HolochainP2pEventSender: GhostChannelSender<HolochainP2pEvent> {
Show 17 methods
fn put_agent_info_signed(
&self,
dna_hash: DnaHash,
peer_data: Vec<AgentInfoSigned>
) -> HolochainP2pEventFuture<()> { ... }
fn query_agent_info_signed(
&self,
dna_hash: DnaHash,
agents: Option<HashSet<Arc<KitsuneAgent>>>,
kitsune_space: Arc<KitsuneSpace>
) -> HolochainP2pEventFuture<Vec<AgentInfoSigned>> { ... }
fn query_gossip_agents(
&self,
dna_hash: DnaHash,
agents: Option<Vec<AgentPubKey>>,
kitsune_space: Arc<KitsuneSpace>,
since_ms: u64,
until_ms: u64,
arc_set: Arc<DhtArcSet>
) -> HolochainP2pEventFuture<Vec<AgentInfoSigned>> { ... }
fn query_agent_info_signed_near_basis(
&self,
dna_hash: DnaHash,
kitsune_space: Arc<KitsuneSpace>,
basis_loc: u32,
limit: u32
) -> HolochainP2pEventFuture<Vec<AgentInfoSigned>> { ... }
fn query_peer_density(
&self,
dna_hash: DnaHash,
kitsune_space: Arc<KitsuneSpace>,
dht_arc: DhtArc
) -> HolochainP2pEventFuture<PeerViewBeta> { ... }
fn call_remote(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
from_agent: AgentPubKey,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO
) -> HolochainP2pEventFuture<SerializedBytes> { ... }
fn publish(
&self,
dna_hash: DnaHash,
request_validation_receipt: bool,
countersigning_session: bool,
ops: Vec<DhtOp>
) -> HolochainP2pEventFuture<()> { ... }
fn get_validation_package(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
header_hash: HeaderHash
) -> HolochainP2pEventFuture<ValidationPackageResponse> { ... }
fn get(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
dht_hash: AnyDhtHash,
options: GetOptions
) -> HolochainP2pEventFuture<WireOps> { ... }
fn get_meta(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
dht_hash: AnyDhtHash,
options: GetMetaOptions
) -> HolochainP2pEventFuture<MetadataSet> { ... }
fn get_links(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
link_key: WireLinkKey,
options: GetLinksOptions
) -> HolochainP2pEventFuture<WireLinkOps> { ... }
fn get_agent_activity(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
agent: AgentPubKey,
query: ChainQueryFilter,
options: GetActivityOptions
) -> HolochainP2pEventFuture<AgentActivityResponse<HeaderHash>> { ... }
fn validation_receipt_received(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
receipt: SerializedBytes
) -> HolochainP2pEventFuture<()> { ... }
fn query_op_hashes(
&self,
dna_hash: DnaHash,
arc_set: DhtArcSet,
window: TimeWindow,
max_ops: usize,
include_limbo: bool
) -> HolochainP2pEventFuture<Option<(Vec<DhtOpHash>, TimeWindowInclusive)>> { ... }
fn fetch_op_data(
&self,
dna_hash: DnaHash,
op_hashes: Vec<DhtOpHash>
) -> HolochainP2pEventFuture<Vec<(DhtOpHash, DhtOp)>> { ... }
fn sign_network_data(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
data: Vec<u8>
) -> HolochainP2pEventFuture<Signature> { ... }
fn countersigning_authority_response(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
signed_headers: Vec<SignedHeader>
) -> HolochainP2pEventFuture<()> { ... }
}
Expand description
The HolochainP2pEvent stream allows handling events generated from the HolochainP2p actor.
Provided methods
fn put_agent_info_signed(
&self,
dna_hash: DnaHash,
peer_data: Vec<AgentInfoSigned>
) -> HolochainP2pEventFuture<()>
fn put_agent_info_signed(
&self,
dna_hash: DnaHash,
peer_data: Vec<AgentInfoSigned>
) -> HolochainP2pEventFuture<()>
We need to store signed agent info.
fn query_agent_info_signed(
&self,
dna_hash: DnaHash,
agents: Option<HashSet<Arc<KitsuneAgent>>>,
kitsune_space: Arc<KitsuneSpace>
) -> HolochainP2pEventFuture<Vec<AgentInfoSigned>>
fn query_agent_info_signed(
&self,
dna_hash: DnaHash,
agents: Option<HashSet<Arc<KitsuneAgent>>>,
kitsune_space: Arc<KitsuneSpace>
) -> HolochainP2pEventFuture<Vec<AgentInfoSigned>>
We need to get previously stored agent info.
fn query_gossip_agents(
&self,
dna_hash: DnaHash,
agents: Option<Vec<AgentPubKey>>,
kitsune_space: Arc<KitsuneSpace>,
since_ms: u64,
until_ms: u64,
arc_set: Arc<DhtArcSet>
) -> HolochainP2pEventFuture<Vec<AgentInfoSigned>>
fn query_gossip_agents(
&self,
dna_hash: DnaHash,
agents: Option<Vec<AgentPubKey>>,
kitsune_space: Arc<KitsuneSpace>,
since_ms: u64,
until_ms: u64,
arc_set: Arc<DhtArcSet>
) -> HolochainP2pEventFuture<Vec<AgentInfoSigned>>
We need to get agents that fit into an arc set for gossip.
fn query_agent_info_signed_near_basis(
&self,
dna_hash: DnaHash,
kitsune_space: Arc<KitsuneSpace>,
basis_loc: u32,
limit: u32
) -> HolochainP2pEventFuture<Vec<AgentInfoSigned>>
fn query_agent_info_signed_near_basis(
&self,
dna_hash: DnaHash,
kitsune_space: Arc<KitsuneSpace>,
basis_loc: u32,
limit: u32
) -> HolochainP2pEventFuture<Vec<AgentInfoSigned>>
query agent info in order of closeness to a basis location.
fn query_peer_density(
&self,
dna_hash: DnaHash,
kitsune_space: Arc<KitsuneSpace>,
dht_arc: DhtArc
) -> HolochainP2pEventFuture<PeerViewBeta>
fn query_peer_density(
&self,
dna_hash: DnaHash,
kitsune_space: Arc<KitsuneSpace>,
dht_arc: DhtArc
) -> HolochainP2pEventFuture<PeerViewBeta>
Query the peer density of a space for a given [DhtArc
].
fn call_remote(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
from_agent: AgentPubKey,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO
) -> HolochainP2pEventFuture<SerializedBytes>
fn call_remote(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
from_agent: AgentPubKey,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO
) -> HolochainP2pEventFuture<SerializedBytes>
A remote node is attempting to make a remote call on us.
A remote node is publishing data in a range we claim to be holding.
fn get_validation_package(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
header_hash: HeaderHash
) -> HolochainP2pEventFuture<ValidationPackageResponse>
fn get_validation_package(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
header_hash: HeaderHash
) -> HolochainP2pEventFuture<ValidationPackageResponse>
A remote node is requesting a validation package.
fn get(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
dht_hash: AnyDhtHash,
options: GetOptions
) -> HolochainP2pEventFuture<WireOps>
fn get(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
dht_hash: AnyDhtHash,
options: GetOptions
) -> HolochainP2pEventFuture<WireOps>
A remote node is requesting entry data from us.
fn get_meta(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
dht_hash: AnyDhtHash,
options: GetMetaOptions
) -> HolochainP2pEventFuture<MetadataSet>
fn get_meta(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
dht_hash: AnyDhtHash,
options: GetMetaOptions
) -> HolochainP2pEventFuture<MetadataSet>
A remote node is requesting metadata from us.
fn get_links(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
link_key: WireLinkKey,
options: GetLinksOptions
) -> HolochainP2pEventFuture<WireLinkOps>
fn get_links(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
link_key: WireLinkKey,
options: GetLinksOptions
) -> HolochainP2pEventFuture<WireLinkOps>
A remote node is requesting link data from us.
fn get_agent_activity(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
agent: AgentPubKey,
query: ChainQueryFilter,
options: GetActivityOptions
) -> HolochainP2pEventFuture<AgentActivityResponse<HeaderHash>>
fn get_agent_activity(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
agent: AgentPubKey,
query: ChainQueryFilter,
options: GetActivityOptions
) -> HolochainP2pEventFuture<AgentActivityResponse<HeaderHash>>
A remote node is requesting agent activity from us.
fn validation_receipt_received(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
receipt: SerializedBytes
) -> HolochainP2pEventFuture<()>
fn validation_receipt_received(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
receipt: SerializedBytes
) -> HolochainP2pEventFuture<()>
A remote node has sent us a validation receipt.
fn query_op_hashes(
&self,
dna_hash: DnaHash,
arc_set: DhtArcSet,
window: TimeWindow,
max_ops: usize,
include_limbo: bool
) -> HolochainP2pEventFuture<Option<(Vec<DhtOpHash>, TimeWindowInclusive)>>
fn query_op_hashes(
&self,
dna_hash: DnaHash,
arc_set: DhtArcSet,
window: TimeWindow,
max_ops: usize,
include_limbo: bool
) -> HolochainP2pEventFuture<Option<(Vec<DhtOpHash>, TimeWindowInclusive)>>
The p2p module wishes to query our DhtOpHash store. Gets all ops from a set of agents within a time window and max number of ops. Returns the actual time window of returned ops as well.
The p2p module needs access to the content for a given set of DhtOpHashes.
fn sign_network_data(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
data: Vec<u8>
) -> HolochainP2pEventFuture<Signature>
fn sign_network_data(
&self,
dna_hash: DnaHash,
to_agent: AgentPubKey,
data: Vec<u8>
) -> HolochainP2pEventFuture<Signature>
P2p operations require cryptographic signatures and validation.
Response from an authority to agents that are part of a session.