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 AddrTuple struct + Addr swarm.Address + PO uint8 + type Mock struct + func NewMockKademlia(o ...Option) *Mock + func (d *Mock) Halt() + func (m *Mock) AddPeers(addr ...swarm.Address) + func (m *Mock) Announce(_ context.Context, _ swarm.Address, _ bool) error + func (m *Mock) AnnounceTo(_ context.Context, _, _ swarm.Address, _ bool) error + func (m *Mock) Close() error + func (m *Mock) ClosestPeer(addr swarm.Address, _ bool, _ topology.Filter, skipPeers ...swarm.Address) (peerAddr swarm.Address, err error) + func (m *Mock) Connected(_ context.Context, peer p2p.Peer, _ bool) error + func (m *Mock) Disconnected(peer p2p.Peer) + func (m *Mock) EachNeighbor(topology.EachPeerFunc) error + func (m *Mock) EachNeighborRev(topology.EachPeerFunc) error + func (m *Mock) EachPeer(f topology.EachPeerFunc, _ topology.Filter) error + func (m *Mock) EachPeerRev(f topology.EachPeerFunc, _ topology.Filter) error + func (m *Mock) IsWithinDepth(adr swarm.Address) bool + func (m *Mock) NeighborhoodDepth() uint8 + func (m *Mock) ResetPeers() + func (m *Mock) Snapshot() *topology.KadParams + func (m *Mock) SubscribePeersChange() (c <-chan struct{}, unsubscribe func()) + func (m *Mock) Trigger() + type Option interface + func WithDepth(d uint8) Option + func WithDepthCalls(d ...uint8) Option + func WithEachPeerRevCalls(addrs ...AddrTuple) Option