Enum holochain::prelude::actor::HolochainP2p
source · pub enum HolochainP2p {
Show 16 variants
Join {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>,
initial_arc: Option<DhtArc>,
},
Leave {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
agent_pub_key: HoloHash<Agent>,
},
CallRemote {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent: HoloHash<Agent>,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO,
},
RemoteSignal {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
from_agent: HoloHash<Agent>,
to_agent_list: Vec<HoloHash<Agent>, Global>,
zome_name: ZomeName,
fn_name: FunctionName,
cap: Option<CapSecret>,
payload: ExternIO,
},
Publish {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<usize, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
request_validation_receipt: bool,
countersigning_session: bool,
basis_hash: HoloHash<AnyLinkable>,
ops: Vec<DhtOp, Global>,
timeout_ms: Option<u64>,
},
Get {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<WireOps, Global>, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetOptions,
},
GetMeta {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<MetadataSet, Global>, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
dht_hash: HoloHash<AnyDht>,
options: GetMetaOptions,
},
GetLinks {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<WireLinkOps, Global>, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
link_key: WireLinkKey,
options: GetLinksOptions,
},
GetAgentActivity {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentActivityResponse<HoloHash<Action>>, Global>, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
agent: HoloHash<Agent>,
query: ChainQueryFilter,
options: GetActivityOptions,
},
MustGetAgentActivity {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<MustGetAgentActivityResponse, Global>, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
author: HoloHash<Agent>,
filter: ChainFilter<HoloHash<Action>>,
},
SendValidationReceipt {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
to_agent: HoloHash<Agent>,
receipt: SerializedBytes,
},
NewIntegratedData {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
},
AuthorityForHash {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<bool, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
basis: HoloHash<AnyLinkable>,
},
CountersigningSessionNegotiation {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
agents: Vec<HoloHash<Agent>, Global>,
message: CountersigningSessionNegotiationMessage,
},
DumpNetworkMetrics {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<String, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: Option<HoloHash<Dna>>,
},
GetDiagnostics {
span_context: Context,
respond: GhostRespond<Result<MustBoxFuture<'static, Result<GossipDiagnostics, HolochainP2pError>>, HolochainP2pError>>,
dna_hash: HoloHash<Dna>,
},
}
Expand description
The HolochainP2pSender struct allows controlling the HolochainP2p actor instance.
Variants
Join
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
The p2p module must be informed at runtime which dna/agent pairs it should be tracking.
Leave
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
If a cell is disabled, we’ll need to "leave" the network module as well.
CallRemote
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
zome_name: ZomeName
Input parameter.
fn_name: FunctionName
Input parameter.
payload: ExternIO
Input parameter.
Invoke a zome function on a remote node (if you have been granted the capability).
RemoteSignal
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
zome_name: ZomeName
Input parameter.
fn_name: FunctionName
Input parameter.
payload: ExternIO
Input parameter.
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
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<usize, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
request_validation_receipt: bool
Input parameter.
countersigning_session: bool
Input parameter.
basis_hash: HoloHash<AnyLinkable>
Input parameter.
Publish data to the correct neighborhood.
Get
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<WireOps, Global>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
options: GetOptions
Input parameter.
Get an entry from the DHT.
GetMeta
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<MetadataSet, Global>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
options: GetMetaOptions
Input parameter.
Get metadata from the DHT.
GetLinks
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<WireLinkOps, Global>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
link_key: WireLinkKey
Input parameter.
options: GetLinksOptions
Input parameter.
Get links from the DHT.
GetAgentActivity
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentActivityResponse<HoloHash<Action>>, Global>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
query: ChainQueryFilter
Input parameter.
options: GetActivityOptions
Input parameter.
Get agent activity from the DHT.
MustGetAgentActivity
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<MustGetAgentActivityResponse, Global>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
Input parameter.
filter: ChainFilter<HoloHash<Action>>
Input parameter.
A remote node is requesting agent activity from us.
SendValidationReceipt
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
receipt: SerializedBytes
Input parameter.
Send a validation receipt to a remote node.
NewIntegratedData
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
New data has been integrated and is ready for gossiping.
AuthorityForHash
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<bool, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
basis: HoloHash<AnyLinkable>
Input parameter.
Check if any local agent in this space is an authority for a hash.
CountersigningSessionNegotiation
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
message: CountersigningSessionNegotiationMessage
Input parameter.
Messages between agents negotiation a countersigning session.
DumpNetworkMetrics
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<String, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
Dump network metrics.
GetDiagnostics
Fields
span_context: Context
Tracing span from request invocation.
respond: GhostRespond<Result<MustBoxFuture<'static, Result<GossipDiagnostics, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
Get struct for diagnostic data
Trait Implementations
sourceimpl Debug for HolochainP2p
impl Debug for HolochainP2p
sourceimpl<H> GhostDispatch<H> for HolochainP2pwhere
H: HolochainP2pHandler,
impl<H> GhostDispatch<H> for HolochainP2pwhere
H: HolochainP2pHandler,
sourcefn ghost_actor_dispatch(self, h: &mut H)
fn ghost_actor_dispatch(self, h: &mut H)
impl GhostEvent for HolochainP2p
Auto Trait Implementations
impl !RefUnwindSafe for HolochainP2p
impl Send for HolochainP2p
impl Sync for HolochainP2p
impl Unpin for HolochainP2p
impl !UnwindSafe for HolochainP2p
Blanket Implementations
impl<T> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
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> ⓘ
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.