Enum holochain::prelude::kitsune_p2p::event::KitsuneP2pEvent
source · pub enum KitsuneP2pEvent {
PutAgentInfoSigned {
span_context: (),
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>,
input: PutAgentInfoSignedEvt,
},
QueryAgents {
span_context: (),
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, KitsuneP2pError>>, KitsuneP2pError>>,
input: QueryAgentsEvt,
},
QueryPeerDensity {
span_context: (),
respond: GhostRespond<Result<MustBoxFuture<'static, Result<PeerView, KitsuneP2pError>>, KitsuneP2pError>>,
space: Arc<KitsuneSpace, Global>,
dht_arc: DhtArc,
},
Call {
span_context: (),
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>>, KitsuneP2pError>>,
space: Arc<KitsuneSpace, Global>,
to_agent: Arc<KitsuneAgent, Global>,
payload: Vec<u8, Global>,
},
Notify {
span_context: (),
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>,
space: Arc<KitsuneSpace, Global>,
to_agent: Arc<KitsuneAgent, Global>,
payload: Vec<u8, Global>,
},
ReceiveOps {
span_context: (),
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>,
space: Arc<KitsuneSpace, Global>,
ops: Vec<Arc<KitsuneOpData, Global>, Global>,
context: Option<FetchContext>,
},
QueryOpHashes {
span_context: (),
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Option<(Vec<Arc<KitsuneOpHash, Global>, Global>, RangeInclusive<Timestamp>)>, KitsuneP2pError>>, KitsuneP2pError>>,
input: QueryOpHashesEvt,
},
FetchOpData {
span_context: (),
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<(Arc<KitsuneOpHash, Global>, Arc<KitsuneOpData, Global>), Global>, KitsuneP2pError>>, KitsuneP2pError>>,
input: FetchOpDataEvt,
},
SignNetworkData {
span_context: (),
respond: GhostRespond<Result<MustBoxFuture<'static, Result<KitsuneSignature, KitsuneP2pError>>, KitsuneP2pError>>,
input: SignNetworkDataEvt,
},
}
Expand description
The KitsuneP2pEvent stream allows handling events generated from the KitsuneP2p actor.
Variants§
PutAgentInfoSigned
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>
Response callback - respond to the request.
input: PutAgentInfoSignedEvt
Input parameter.
We need to store signed agent info.
QueryAgents
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, KitsuneP2pError>>, KitsuneP2pError>>
Response callback - respond to the request.
input: QueryAgentsEvt
Input parameter.
We need to get previously stored agent info.
QueryPeerDensity
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<PeerView, KitsuneP2pError>>, KitsuneP2pError>>
Response callback - respond to the request.
space: Arc<KitsuneSpace, Global>
Input parameter.
Query the peer density of a space for a given [DhtArc
].
Call
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>>, KitsuneP2pError>>
Response callback - respond to the request.
space: Arc<KitsuneSpace, Global>
Input parameter.
to_agent: Arc<KitsuneAgent, Global>
Input parameter.
We are receiving a request from a remote node.
Notify
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>
Response callback - respond to the request.
space: Arc<KitsuneSpace, Global>
Input parameter.
to_agent: Arc<KitsuneAgent, Global>
Input parameter.
We are receiving a notification from a remote node.
ReceiveOps
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>
Response callback - respond to the request.
space: Arc<KitsuneSpace, Global>
Input parameter.
context: Option<FetchContext>
Input parameter.
We have received ops to be integrated, either through gossip or publish.
QueryOpHashes
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Option<(Vec<Arc<KitsuneOpHash, Global>, Global>, RangeInclusive<Timestamp>)>, KitsuneP2pError>>, KitsuneP2pError>>
Response callback - respond to the request.
input: QueryOpHashesEvt
Input parameter.
Gather a list of op-hashes from our implementor that meet criteria. Get the oldest and newest times for ops within a time window and max number of ops.
FetchOpData
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<(Arc<KitsuneOpHash, Global>, Arc<KitsuneOpData, Global>), Global>, KitsuneP2pError>>, KitsuneP2pError>>
Response callback - respond to the request.
input: FetchOpDataEvt
Input parameter.
Gather all op-hash data for a list of op-hashes from our implementor.
SignNetworkData
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<KitsuneSignature, KitsuneP2pError>>, KitsuneP2pError>>
Response callback - respond to the request.
input: SignNetworkDataEvt
Input parameter.
Request that our implementor sign some data on behalf of an agent.
Trait Implementations§
source§impl Debug for KitsuneP2pEvent
impl Debug for KitsuneP2pEvent
source§impl<H> GhostDispatch<H> for KitsuneP2pEventwhere
H: KitsuneP2pEventHandler,
impl<H> GhostDispatch<H> for KitsuneP2pEventwhere H: KitsuneP2pEventHandler,
source§fn ghost_actor_dispatch(self, h: &mut H)
fn ghost_actor_dispatch(self, h: &mut H)
impl GhostEvent for KitsuneP2pEvent
Auto Trait Implementations§
impl !RefUnwindSafe for KitsuneP2pEvent
impl Send for KitsuneP2pEvent
impl Sync for KitsuneP2pEvent
impl Unpin for KitsuneP2pEvent
impl !UnwindSafe for KitsuneP2pEvent
Blanket Implementations§
§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
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn 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> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn 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 more§fn 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.