Enum holochain_p2p::event::HolochainP2pEvent
source · [−]pub enum HolochainP2pEvent {
Show 17 variants
PutAgentInfoSigned {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<()>>,
dna_hash: DnaHash,
peer_data: Vec<AgentInfoSigned>,
},
QueryAgentInfoSigned {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<Vec<AgentInfoSigned>>>,
dna_hash: DnaHash,
agents: Option<HashSet<Arc<KitsuneAgent>>>,
kitsune_space: Arc<KitsuneSpace>,
},
QueryGossipAgents {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<Vec<AgentInfoSigned>>>,
dna_hash: DnaHash,
agents: Option<Vec<AgentPubKey>>,
kitsune_space: Arc<KitsuneSpace>,
since_ms: u64,
until_ms: u64,
arc_set: Arc<DhtArcSet>,
},
QueryAgentInfoSignedNearBasis {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<Vec<AgentInfoSigned>>>,
dna_hash: DnaHash,
kitsune_space: Arc<KitsuneSpace>,
basis_loc: u32,
limit: u32,
},
QueryPeerDensity {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<PeerViewBeta>>,
dna_hash: DnaHash,
kitsune_space: Arc<KitsuneSpace>,
dht_arc: DhtArc,
},
CallRemote {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<SerializedBytes>>,
dna_hash: DnaHash,
to_agent: AgentPubKey,
from_agent: AgentPubKey,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO,
},
Publish {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<()>>,
dna_hash: DnaHash,
request_validation_receipt: bool,
countersigning_session: bool,
ops: Vec<DhtOp>,
},
GetValidationPackage {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<ValidationPackageResponse>>,
dna_hash: DnaHash,
to_agent: AgentPubKey,
header_hash: HeaderHash,
},
Get {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<WireOps>>,
dna_hash: DnaHash,
to_agent: AgentPubKey,
dht_hash: AnyDhtHash,
options: GetOptions,
},
GetMeta {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<MetadataSet>>,
dna_hash: DnaHash,
to_agent: AgentPubKey,
dht_hash: AnyDhtHash,
options: GetMetaOptions,
},
GetLinks {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<WireLinkOps>>,
dna_hash: DnaHash,
to_agent: AgentPubKey,
link_key: WireLinkKey,
options: GetLinksOptions,
},
GetAgentActivity {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<AgentActivityResponse<HeaderHash>>>,
dna_hash: DnaHash,
to_agent: AgentPubKey,
agent: AgentPubKey,
query: ChainQueryFilter,
options: GetActivityOptions,
},
ValidationReceiptReceived {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<()>>,
dna_hash: DnaHash,
to_agent: AgentPubKey,
receipt: SerializedBytes,
},
QueryOpHashes {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<Option<(Vec<DhtOpHash>, TimeWindowInclusive)>>>,
dna_hash: DnaHash,
arc_set: DhtArcSet,
window: TimeWindow,
max_ops: usize,
include_limbo: bool,
},
FetchOpData {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<Vec<(DhtOpHash, DhtOp)>>>,
dna_hash: DnaHash,
op_hashes: Vec<DhtOpHash>,
},
SignNetworkData {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<Signature>>,
dna_hash: DnaHash,
to_agent: AgentPubKey,
data: Vec<u8>,
},
CountersigningAuthorityResponse {
span_context: Context,
respond: GhostRespond<HolochainP2pEventHandlerResult<()>>,
dna_hash: DnaHash,
to_agent: AgentPubKey,
signed_headers: Vec<SignedHeader>,
},
}
Expand description
The HolochainP2pEvent stream allows handling events generated from the HolochainP2p actor.
Variants
PutAgentInfoSigned
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<()>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
peer_data: Vec<AgentInfoSigned>
Input parameter.
We need to store signed agent info.
QueryAgentInfoSigned
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<Vec<AgentInfoSigned>>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
agents: Option<HashSet<Arc<KitsuneAgent>>>
Input parameter.
kitsune_space: Arc<KitsuneSpace>
Input parameter.
We need to get previously stored agent info.
QueryGossipAgents
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<Vec<AgentInfoSigned>>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
agents: Option<Vec<AgentPubKey>>
Input parameter.
kitsune_space: Arc<KitsuneSpace>
Input parameter.
since_ms: u64
Input parameter.
until_ms: u64
Input parameter.
arc_set: Arc<DhtArcSet>
Input parameter.
We need to get agents that fit into an arc set for gossip.
QueryAgentInfoSignedNearBasis
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<Vec<AgentInfoSigned>>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
kitsune_space: Arc<KitsuneSpace>
Input parameter.
basis_loc: u32
Input parameter.
limit: u32
Input parameter.
query agent info in order of closeness to a basis location.
QueryPeerDensity
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<PeerViewBeta>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
kitsune_space: Arc<KitsuneSpace>
Input parameter.
Query the peer density of a space for a given [DhtArc
].
CallRemote
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<SerializedBytes>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
to_agent: AgentPubKey
Input parameter.
from_agent: AgentPubKey
Input parameter.
cap_secret: Option<CapSecret>
Input parameter.
A remote node is attempting to make a remote call on us.
Publish
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<()>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
request_validation_receipt: bool
Input parameter.
countersigning_session: bool
Input parameter.
A remote node is publishing data in a range we claim to be holding.
GetValidationPackage
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<ValidationPackageResponse>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
to_agent: AgentPubKey
Input parameter.
header_hash: HeaderHash
Input parameter.
A remote node is requesting a validation package.
Get
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<WireOps>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
to_agent: AgentPubKey
Input parameter.
dht_hash: AnyDhtHash
Input parameter.
options: GetOptions
Input parameter.
A remote node is requesting entry data from us.
GetMeta
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<MetadataSet>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
to_agent: AgentPubKey
Input parameter.
dht_hash: AnyDhtHash
Input parameter.
options: GetMetaOptions
Input parameter.
A remote node is requesting metadata from us.
GetLinks
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<WireLinkOps>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
to_agent: AgentPubKey
Input parameter.
link_key: WireLinkKey
Input parameter.
options: GetLinksOptions
Input parameter.
A remote node is requesting link data from us.
GetAgentActivity
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<AgentActivityResponse<HeaderHash>>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
to_agent: AgentPubKey
Input parameter.
agent: AgentPubKey
Input parameter.
query: ChainQueryFilter
Input parameter.
options: GetActivityOptions
Input parameter.
A remote node is requesting agent activity from us.
ValidationReceiptReceived
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<()>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
to_agent: AgentPubKey
Input parameter.
receipt: SerializedBytes
Input parameter.
A remote node has sent us a validation receipt.
QueryOpHashes
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<Option<(Vec<DhtOpHash>, TimeWindowInclusive)>>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
window: TimeWindow
Input parameter.
max_ops: usize
Input parameter.
include_limbo: bool
Input parameter.
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.
FetchOpData
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<Vec<(DhtOpHash, DhtOp)>>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
The p2p module needs access to the content for a given set of DhtOpHashes.
SignNetworkData
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<Signature>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
to_agent: AgentPubKey
Input parameter.
P2p operations require cryptographic signatures and validation.
CountersigningAuthorityResponse
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<HolochainP2pEventHandlerResult<()>>
Response callback - respond to the request.
dna_hash: DnaHash
Input parameter.
to_agent: AgentPubKey
Input parameter.
signed_headers: Vec<SignedHeader>
Input parameter.
Response from an authority to agents that are part of a session.
Implementations
sourceimpl HolochainP2pEvent
impl HolochainP2pEvent
sourcepub fn target_agents(&self) -> &AgentPubKey
pub fn target_agents(&self) -> &AgentPubKey
The agent_pub_key associated with this network p2p event.
Trait Implementations
sourceimpl Debug for HolochainP2pEvent
impl Debug for HolochainP2pEvent
sourceimpl<H: HolochainP2pEventHandler> GhostDispatch<H> for HolochainP2pEvent
impl<H: HolochainP2pEventHandler> GhostDispatch<H> for HolochainP2pEvent
sourcefn ghost_actor_dispatch(self, h: &mut H)
fn ghost_actor_dispatch(self, h: &mut H)
Process a dispatch event with a given GhostHandler.
impl GhostEvent for HolochainP2pEvent
Auto Trait Implementations
impl !RefUnwindSafe for HolochainP2pEvent
impl Send for HolochainP2pEvent
impl Sync for HolochainP2pEvent
impl Unpin for HolochainP2pEvent
impl !UnwindSafe for HolochainP2pEvent
Blanket Implementations
impl<T> Any for T where
T: Any + ?Sized,
impl<T> Any for T where
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more