pub enum KitsuneP2pEvent {
    KGenReq {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<KGenRes>>,
        arg: KGenReq,
    },
    PutAgentInfoSigned {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<()>>,
        input: PutAgentInfoSignedEvt,
    },
    GetAgentInfoSigned {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<Option<AgentInfoSigned>>>,
        input: GetAgentInfoSignedEvt,
    },
    QueryAgents {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<Vec<AgentInfoSigned>>>,
        input: QueryAgentsEvt,
    },
    QueryPeerDensity {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<PeerViewBeta>>,
        space: Arc<KitsuneSpace>,
        dht_arc: DhtArc,
    },
    Call {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<Vec<u8>>>,
        space: Arc<KitsuneSpace>,
        to_agent: Arc<KitsuneAgent>,
        payload: Vec<u8>,
    },
    Notify {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<()>>,
        space: Arc<KitsuneSpace>,
        to_agent: Arc<KitsuneAgent>,
        payload: Vec<u8>,
    },
    Gossip {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<()>>,
        space: Arc<KitsuneSpace>,
        ops: Vec<(Arc<KitsuneOpHash>, Vec<u8>)>,
    },
    QueryOpHashes {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<Option<(Vec<Arc<KitsuneOpHash>>, TimeWindowInclusive)>>>,
        input: QueryOpHashesEvt,
    },
    FetchOpData {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<Vec<(Arc<KitsuneOpHash>, Vec<u8>)>>>,
        input: FetchOpDataEvt,
    },
    SignNetworkData {
        span_context: Context,
        respond: GhostRespond<KitsuneP2pEventHandlerResult<KitsuneSignature>>,
        input: SignNetworkDataEvt,
    },
}
Expand description

The KitsuneP2pEvent stream allows handling events generated from the KitsuneP2p actor.

Variants

KGenReq

Fields

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<KGenRes>>

Response callback - respond to the request.

arg: KGenReq

Input parameter.

Generic Kitsune Request of the implementor

PutAgentInfoSigned

Fields

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<()>>

Response callback - respond to the request.

input: PutAgentInfoSignedEvt

Input parameter.

We need to store signed agent info.

GetAgentInfoSigned

Fields

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<Option<AgentInfoSigned>>>

Response callback - respond to the request.

input: GetAgentInfoSignedEvt

Input parameter.

We need to get previously stored agent info.

QueryAgents

Fields

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<Vec<AgentInfoSigned>>>

Response callback - respond to the request.

input: QueryAgentsEvt

Input parameter.

We need to get previously stored agent info.

QueryPeerDensity

Fields

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<PeerViewBeta>>

Response callback - respond to the request.

space: Arc<KitsuneSpace>

Input parameter.

dht_arc: DhtArc

Input parameter.

Query the peer density of a space for a given [DhtArc].

Call

Fields

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<Vec<u8>>>

Response callback - respond to the request.

space: Arc<KitsuneSpace>

Input parameter.

to_agent: Arc<KitsuneAgent>

Input parameter.

payload: Vec<u8>

Input parameter.

We are receiving a request from a remote node.

Notify

Fields

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<()>>

Response callback - respond to the request.

space: Arc<KitsuneSpace>

Input parameter.

to_agent: Arc<KitsuneAgent>

Input parameter.

payload: Vec<u8>

Input parameter.

We are receiving a notification from a remote node.

Gossip

Fields

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<()>>

Response callback - respond to the request.

space: Arc<KitsuneSpace>

Input parameter.

ops: Vec<(Arc<KitsuneOpHash>, Vec<u8>)>

Input parameter.

We are receiving a dht op we may need to hold distributed via gossip.

QueryOpHashes

Fields

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<Option<(Vec<Arc<KitsuneOpHash>>, TimeWindowInclusive)>>>

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

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<Vec<(Arc<KitsuneOpHash>, Vec<u8>)>>>

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

span_context: Context

Tracing span from request invocation.

respond: GhostRespond<KitsuneP2pEventHandlerResult<KitsuneSignature>>

Response callback - respond to the request.

input: SignNetworkDataEvt

Input parameter.

Request that our implementor sign some data on behalf of an agent.

Trait Implementations

Formats the value using the given formatter. Read more

Process a dispatch event with a given GhostHandler.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more