Versions in this module Expand all Collapse all v0 v0.0.4 Nov 4, 2021 v0.0.3 Oct 21, 2021 Changes in this version + var ErrAllWireMessagesFailed = errors.New("all wire protocol messages failed") + type ContentRouting interface + FindProvider func(context context.Context, key []byte) (chan address.PeerAddressInfo, error) + Provide func(context context.Context, key []byte) error + type DistributedHashTable interface + GetKnownPeers func() []address.PeerAddressInfo + GetSelf func() address.PeerAddressInfo + Start func([]string) + Stop func() + func NewKademliaHost(host string, port int32) DistributedHashTable + type Kademlia struct + LiveCheckTask *tasks.LiveCheckTask + ProtocolMessenger *network.ProtocolMessenger + ProviderRecordStore *prstore.ProviderStore + RoutingController *routing.Controller + RoutingTable *routingtable.RoutingTable + SelfAddrInfo address.PeerAddressInfo + SelfAddrSerialized string + ValueStore *vstore.ValueStore + WireMessengerServer *network.Server + func (kad *Kademlia) FindPeerAtDistance(context context.Context, target []byte, _ int) ([]address.PeerAddressInfo, error) + func (kad *Kademlia) FindPeersClosest(ctx context.Context, targetId []byte, k int) ([]address.PeerAddressInfo, error) + func (kad *Kademlia) FindProvider(context context.Context, key []byte) (chan address.PeerAddressInfo, error) + func (kad *Kademlia) Get(key []byte) ([]byte, error) + func (kad *Kademlia) GetKnownPeers() []address.PeerAddressInfo + func (kad *Kademlia) GetSelf() address.PeerAddressInfo + func (kad *Kademlia) Provide(context context.Context, key []byte) error + func (kad *Kademlia) Put(key []byte, value []byte) error + func (kad *Kademlia) Start(bootNodes []string) + func (kad *Kademlia) Stop() + type KeyValueStore interface + Get func(key []byte) ([]byte, error) + Put func(key []byte, value []byte) error + type PeerRouting interface + FindPeerAtDistance func(context context.Context, target []byte, distance int) ([]address.PeerAddressInfo, error) + FindPeersClosest func(ctx context.Context, targetId []byte, k int) ([]address.PeerAddressInfo, error)