modulepackage
0.0.0-20230701163456-27d7aa5e0cf7
Repository: https://github.com/mikelsr/go-libp2p-kbucket.git
Documentation: pkg.go.dev
# README
go-libp2p-kbucket
A kbucket implementation for use as a routing table in go-libp2p-kad-dht
Documenation
See https://godoc.org/github.com/libp2p/go-libp2p-kbucket.
Contribute
Feel free to join in. All welcome. Open an issue!
This repository falls under the libp2p Code of Conduct.
Want to hack on libp2p?
License
MIT
The last gx published version of this module was: 2.2.23: QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
Closer returns true if a is closer to key than b is.
No description provided by the author
ConvertKey creates a DHT ID by hashing a local key (String).
ConvertPeerID creates a DHT ID by hashing a Peer ID (Multihash).
NewRoutingTable creates a new routing table with a given bucketsize, local ID, and latency tolerance.
SortClosestPeers Sort the given peers by their ascending distance from the target.
# Variables
ErrLookupFailure is returned if a routing table query returns no results.
No description provided by the author
No description provided by the author
# Structs
PeerInfo holds all related information for a peer in the K-Bucket.
RoutingTable defines the routing table.
# Type aliases
ID for IpfsDHT is in the XORKeySpace
The type dht.ID signifies that its contents have been hashed from either a peer.ID or a util.Key.