Versions in this module Expand all Collapse all v0 v0.7.1 Sep 14, 2022 v0.7.0 Jul 8, 2022 Changes in this version + type Kad struct + func New(base swarm.Address, addressbook addressbook.Interface, ...) (*Kad, error) + func (k *Kad) AddPeers(addrs ...swarm.Address) + func (k *Kad) Announce(ctx context.Context, peer swarm.Address, fullnode bool) error + func (k *Kad) AnnounceTo(ctx context.Context, addressee, peer swarm.Address, fullnode bool) error + func (k *Kad) Close() error + func (k *Kad) ClosestPeer(addr swarm.Address, includeSelf bool, filter topology.Filter, ...) (swarm.Address, error) + func (k *Kad) Connected(ctx context.Context, peer p2p.Peer, forceConnection bool) (err error) + func (k *Kad) Disconnected(peer p2p.Peer) + func (k *Kad) EachNeighbor(f topology.EachPeerFunc) error + func (k *Kad) EachNeighborRev(f topology.EachPeerFunc) error + func (k *Kad) EachPeer(f topology.EachPeerFunc, filter topology.Filter) error + func (k *Kad) EachPeerRev(f topology.EachPeerFunc, filter topology.Filter) error + func (k *Kad) Halt() + func (k *Kad) IsBalanced(bin uint8) bool + func (k *Kad) IsWithinDepth(addr swarm.Address) bool + func (k *Kad) Metrics() []prometheus.Collector + func (k *Kad) NeighborhoodDepth() uint8 + func (k *Kad) Pick(peer p2p.Peer) bool + func (k *Kad) Reachable(addr swarm.Address, status p2p.ReachabilityStatus) + func (k *Kad) SetRadius(r uint8) + func (k *Kad) Snapshot() *topology.KadParams + func (k *Kad) Start(_ context.Context) error + func (k *Kad) String() string + func (k *Kad) SubscribePeersChange() (c <-chan struct{}, unsubscribe func()) + func (k *Kad) UpdateReachability(status p2p.ReachabilityStatus) + type Options struct + BitSuffixLength int + BootnodeMode bool + Bootnodes []ma.Multiaddr + PruneFunc pruneFunc + ReachabilityFunc peerFilterFunc + SaturationFunc binSaturationFunc + StaticNodes []swarm.Address