Expand description
Implementation of the libp2p-specific Kademlia protocol.
Re-exports§
pub use protocol::KadConnectionType;pub use record::store;pub use record::Record;pub use record::ProviderRecord;
Modules§
- handler
- kbucket
- Implementation of a Kademlia routing table as used by a single peer participating in a Kademlia DHT.
- protocol
- The Kademlia connection protocol upgrade and associated message types.
- record
- Records and record storage abstraction of the libp2p Kademlia DHT.
Structs§
- AddProvider
Ok - The successful result of publishing a provider record.
- Addresses
- A non-empty list of (unique) addresses of a peer in the routing table.
- Bootstrap
Ok - The successful result of
Kademlia::bootstrap. - GetClosest
Peers Ok - The successful result of
Kademlia::get_closest_peers. - GetProviders
Ok - The successful result of
Kademlia::get_providers. - GetRecord
Ok - The successful result of
Kademlia::get_record. - Kademlia
Kademliais aNetworkBehaviourthat implements the libp2p Kademlia protocol.- Kademlia
Config - The configuration for the
Kademliabehaviour. - Peer
Record - A record either received by the given peer or retrieved from the local record store.
- PutRecord
Ok - The successful result of
Kademlia::put_record. - QueryId
- Unique identifier for an active query.
- Query
Mut - A mutable reference to a running query.
- Query
Ref - An immutable reference to a running query.
- Query
Stats - Execution statistics of a query.
Enums§
- AddProvider
Context - The context of a
QueryInfo::AddProviderquery. - AddProvider
Error - The possible errors when publishing a provider record.
- AddProvider
Phase - The phases of a
QueryInfo::AddProviderquery. - Bootstrap
Error - The error result of
Kademlia::bootstrap. - GetClosest
Peers Error - The error result of
Kademlia::get_closest_peers. - GetProviders
Error - The error result of
Kademlia::get_providers. - GetRecord
Error - The error result of
Kademlia::get_record. - Kademlia
Bucket Inserts - The configurable strategies for the insertion of peers and their addresses into the k-buckets of the Kademlia routing table.
- Kademlia
Event - The events produced by the
Kademliabehaviour. - PutRecord
Context - The context of a
QueryInfo::PutRecordquery. - PutRecord
Error - The error result of
Kademlia::put_record. - PutRecord
Phase - The phases of a
QueryInfo::PutRecordquery. - Query
Info - Information about a running query.
- Query
Result - The results of Kademlia queries.
- Quorum
- A quorum w.r.t. the configured replication factor specifies the minimum number of distinct nodes that must be successfully contacted in order for a query to succeed.
Constants§
- ALPHA_
VALUE - The
αparameter of the Kademlia specification. - K_VALUE
- The
kparameter of the Kademlia specification.
Type Aliases§
- AddProvider
Result - The result of publishing a provider record.
- Bootstrap
Result - The result of
Kademlia::bootstrap. - GetClosest
Peers Result - The result of
Kademlia::get_closest_peers. - GetProviders
Result - The result of
Kademlia::get_providers. - GetRecord
Result - The result of
Kademlia::get_record. - PutRecord
Result - The result of
Kademlia::put_record.