p2p/discovery/backoff/backoff_cache library

Classes

BackoffCache
Cache for peer information with backoff
BackoffDiscovery
BackoffDiscovery is an implementation of discovery that caches peer data and attenuates repeated queries
Clock
Interface for getting the current time
RealClock
Real implementation of Clock using system time

Functions

checkUpdates(Map<PeerId, AddrInfo> orig, Map<PeerId, AddrInfo> update) bool
Checks if the peer addresses have changed
findPeerDispatcher(BackoffCache c, Stream<AddrInfo> peerStream) → void
Dispatches peers from a discovery query to all registered channels
findPeerReceiver(StreamController<AddrInfo> peerController, Stream<AddrInfo> evtStream, List<AddrInfo> rcvPeers) → void
Receives peers from a dispatcher and forwards them to a result channel