Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Btree ¶
type Btree interface { N() int Put(NodeID) PutResult Has(NodeID) bool Drop(NodeID) bool Closest(NodeID, int) []NodeID Count() int EmptiestPrefixLengths() []int Stats() Stats // contains filtered or unexported methods }
Btree is the binary tree implementation used by the Kademlia routing table. The Kademlia literature refers to "buckets" that can be "split" according to certain rules when they are full. This implementation does not use buckets exactly as described in the literature, but rather a simpler binary tree, however the end result is largely equivalent.
type BucketStats ¶
type NodeID ¶
type NodeID []byte
func MustParseBinaryNodeID ¶
func ParseBinaryNodeID ¶
func (NodeID) BinaryString ¶
type Stats ¶
type Stats struct {
Buckets []BucketStats
}
Click to show internal directories.
Click to hide internal directories.