Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerCache ¶
type PeerCache struct { NLevels uint Levels [][]RPeerInfo // contains filtered or unexported fields }
PeerCache holds the performance requirements and peer levels based on reliability
func NewPeerCache ¶
func NewPeerCache(node *p2pnode.Node, regCache *rcache.RegistryCache) *PeerCache
Constructor for PeerCache
func (*PeerCache) RemovePeer ¶
func (*PeerCache) UpdateCache ¶
func (cache *PeerCache) UpdateCache()
Takes care of adding new peers and updating cache levels UpdateCache ideally is run in a separate goroutine
Click to show internal directories.
Click to hide internal directories.