Crate kitsune2_api

Crate kitsune2_api 

Source
Expand description

Kitsune2 API contains kitsune module traits and the basic types required to define the api of those traits.

If you want to use Kitsune2 itself, please see the kitsune2 crate.

Modules§

doc
Documentation module for the Kitsune2 project.

Structs§

AgentId
Identifies an agent to be tracked as part of a Kitsune space.
AgentInfo
AgentInfo stores metadata related to agents.
AgentInfoSigned
Signed agent information.
Builder
The general Kitsune2 builder. This contains both configuration and factory instances, allowing construction of runtime module instances.
Config
Kitsune configuration.
DefaultTransport
A high-level wrapper around a low-level DynTxImp transport implementation.
DhtSegmentState
DHT segment state.
DynInnerError
A clonable trait-object inner error.
FetchRequest
A fetch request.
FetchResponse
A fetch response.
FetchStateSummary
Summary of the fetch state.
GossipRoundStateSummary
Gossip round state summary.
GossipStateSummary
Gossip state summary.
GossipStateSummaryRequest
Request for a gossip state summary.
Id
Base data identity type meant for newtyping. You probably want AgentId or OpId.
K2FetchMessage
Fetch message.
K2Proto
A Kitsune2 wire protocol message.
K2PublishMessage
Publish message.
MetaOp
An op with metadata.
Op
An op.
OpId
Identifies an op to be tracked by Kitsune.
PeerMeta
Peer metadata dump.
PublishAgent
A publish agent message.
PublishOps
A publish ops message.
SpaceId
Identifies a space to be tracked by Kitsune.
StoredOp
An op that has been stored by the Kitsune host.
Timestamp
Kitsune2 timestamp.
TransportConnectionStats
Stats for a single transport connection.
TransportStats
Stats for a transport connection.
TxImpHnd
This is the low-level backend transport handler designed to work with DefaultTransport. Construct using (TxImpHnd::new), with a high-level DynTxHandler, then call DefaultTransport::create to return the high-level handler from the TransportFactory.
Url
A validated Kitsune2 Url.

Enums§

DhtArc
The definition of a storage arc compatible with the concept of storage and querying of items in a store that fall within that arc.
FetchMessageType
Fetch message type.
K2Error
The core kitsune2 error type. This type is used in all external kitsune apis as well as internally in some modules.
K2WireType
Enumeration of the types of messages that can be sent between peers.
PublishMessageType
Publish message type.

Constants§

KEY_PREFIX_ROOT
Key prefix for items at the root level of the peer meta store.
META_KEY_UNRESPONSIVE
Meta key for unresponsive URLs.
UNIX_TIMESTAMP
The unix epoch timestamp.

Traits§

Bootstrap
Method for bootstrapping WAN discovery of peers.
BootstrapFactory
A factory for constructing Bootstrap instances.
Fetch
Trait for implementing a fetch module to fetch ops from other agents.
FetchFactory
A factory for creating Fetch instances.
Gossip
Represents the ability to sync DHT data with other agents through background communication.
GossipFactory
A factory for constructing Gossip instances.
Kitsune
The top-level Kitsune2 api trait.
KitsuneFactory
A factory for constructing Kitsune instances.
KitsuneHandler
Handler for events coming out of Kitsune2.
LocalAgent
A “Local” agent is an agent that is connected to the local Kitsune2 node, and is able to sign messages and agent infos.
LocalAgentStore
A store for local agents.
LocalAgentStoreFactory
A factory for constructing LocalAgentStore instances.
OpStore
The API that a kitsune2 host must implement to provide data persistence for kitsune2.
OpStoreFactory
A factory for constructing OpStore instances.
PeerMetaStore
A store for peer metadata.
PeerMetaStoreFactory
A factory for constructing PeerMetaStore instances.
PeerStore
Represents the ability to store and query agents.
PeerStoreFactory
A factory for constructing PeerStore instances.
Publish
Trait for implementing a publish module to publish ops to other peers.
PublishFactory
A factory for creating Publish instances.
Signer
Defines a type capable of cryptographic signatures.
Space
Represents a unique dht space within which to communicate with peers.
SpaceFactory
A factory for constructing Space instances.
SpaceHandler
Handler for events coming out of Kitsune2 such as messages from peers.
Transport
A high-level wrapper around a low-level DynTxImp transport implementation.
TransportFactory
A factory for constructing Transport instances.
TxBaseHandler
Base trait for transport handler events. The other three handler types are all based on this trait.
TxHandler
Handler for whole transport-level events.
TxImp
A low-level transport implementation.
TxModuleHandler
Handler for module-related events.
TxSpaceHandler
Handler for space-related events.
Verifier
Defines a type capable of cryptographic verification.

Functions§

decode_ids
Decode a list of bytes into a list of typed IDs.
encode_ids
Encode a list of typed IDs into a list of bytes.
serialize_publish_agent
Serialize AgentInfoSigned
serialize_publish_agent_message
Serialize agent publish message.
serialize_publish_ops_message
Serialize list of op ids to fetch request message.
serialize_request
Serialize list of op ids to request.
serialize_request_message
Serialize list of op ids to fetch request message.
serialize_response
Serialize list of ops to response.
serialize_response_message
Serialize list of ops to fetch response message.

Type Aliases§

BoxFut
Boxed future type.
ConfigUpdateCb
A callback to be invoked if the config value is updated at runtime.
DisplayCb
The function signature for Id display overrides.
DynBootstrap
Trait-object Bootstrap.
DynBootstrapFactory
Trait-object BootstrapFactory.
DynFetch
Trait object Fetch.
DynFetchFactory
Trait object FetchFactory.
DynGossip
Trait-object Gossip.
DynGossipFactory
Trait-object GossipFactory.
DynKitsune
Trait-object Kitsune.
DynKitsuneFactory
Trait-object KitsuneFactory.
DynKitsuneHandler
Trait-object KitsuneHandler.
DynLocalAgent
Trait-object LocalAgent.
DynLocalAgentStore
Trait-object version of kitsune2 LocalAgentStore.
DynLocalAgentStoreFactory
Trait-object LocalAgentStoreFactory.
DynOpStore
Trait-object OpStore.
DynOpStoreFactory
Trait-object OpStoreFactory.
DynPeerMetaStore
Trait-object version of kitsune2 PeerMetaStore.
DynPeerMetaStoreFactory
Trait-object PeerMetaStoreFactory.
DynPeerStore
Trait-object PeerStore.
DynPeerStoreFactory
Trait-object PeerStoreFactory.
DynPublish
Trait object Publish.
DynPublishFactory
Trait object PublishFactory.
DynSpace
Trait-object Space.
DynSpaceFactory
Trait-object SpaceFactory.
DynSpaceHandler
Trait-object SpaceHandler.
DynTransport
Trait-object Transport.
DynTransportFactory
Trait-object TransportFactory.
DynTxHandler
Trait-object TxHandler.
DynTxImp
Trait-object TxImp.
DynTxModuleHandler
Trait-object TxModuleHandler.
DynTxSpaceHandler
Trait-object TxSpaceHandler.
DynVerifier
Trait-object Verifier.
K2Result
The core kitsune2 result type.
LocCb
The function signature for Id location derivation.
WeakDynTransport
A weak trait-object Transport.