Documentation ¶
Index ¶
- type PeerEntityRoutingTable
- func (this *PeerEntityRoutingTable) Close()
- func (this *PeerEntityRoutingTable) Find(id peer.ID) peer.ID
- func (this *PeerEntityRoutingTable) GenRandPeerID(targetCpl uint) (peer.ID, error)
- func (this *PeerEntityRoutingTable) GetDiversityStats() []peerdiversity.CplDiversityStats
- func (this *PeerEntityRoutingTable) GetPeerInfos() []kbucket.PeerInfo
- func (this *PeerEntityRoutingTable) GetTrackedCplsForRefresh() []time.Time
- func (this *PeerEntityRoutingTable) ListPeers() []peer.ID
- func (this *PeerEntityRoutingTable) MarkAllPeersIrreplaceable()
- func (this *PeerEntityRoutingTable) NPeersForCpl(cpl uint) int
- func (this *PeerEntityRoutingTable) NearestPeer(id kbucket.ID) peer.ID
- func (this *PeerEntityRoutingTable) NearestPeers(id kbucket.ID, count int) []peer.ID
- func (this *PeerEntityRoutingTable) PeerAdded(peerAdded func(id peer.ID))
- func (this *PeerEntityRoutingTable) PeerRemoved(peerRemoved func(id peer.ID))
- func (this *PeerEntityRoutingTable) Print()
- func (this *PeerEntityRoutingTable) RemovePeer(p peer.ID)
- func (this *PeerEntityRoutingTable) ResetCplRefreshedAtForID(id kbucket.ID, newTime time.Time)
- func (this *PeerEntityRoutingTable) Size() int
- func (this *PeerEntityRoutingTable) TryAddPeer(p peer.ID, queryPeer bool, isReplaceable bool) (bool, error)
- func (this *PeerEntityRoutingTable) UpdateLastSuccessfulOutboundQueryAt(p peer.ID, t time.Time) bool
- func (this *PeerEntityRoutingTable) UpdateLastUsefulAt(p peer.ID, t time.Time) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerEntityRoutingTable ¶
type PeerEntityRoutingTable struct {
RoutingTable *kbucket.RoutingTable
}
* 提供了routingTable的服务的封装供外部调用
func (*PeerEntityRoutingTable) Close ¶
func (this *PeerEntityRoutingTable) Close()
func (*PeerEntityRoutingTable) GenRandPeerID ¶
func (this *PeerEntityRoutingTable) GenRandPeerID(targetCpl uint) (peer.ID, error)
func (*PeerEntityRoutingTable) GetDiversityStats ¶
func (this *PeerEntityRoutingTable) GetDiversityStats() []peerdiversity.CplDiversityStats
func (*PeerEntityRoutingTable) GetPeerInfos ¶
func (this *PeerEntityRoutingTable) GetPeerInfos() []kbucket.PeerInfo
func (*PeerEntityRoutingTable) GetTrackedCplsForRefresh ¶
func (this *PeerEntityRoutingTable) GetTrackedCplsForRefresh() []time.Time
func (*PeerEntityRoutingTable) ListPeers ¶
func (this *PeerEntityRoutingTable) ListPeers() []peer.ID
func (*PeerEntityRoutingTable) MarkAllPeersIrreplaceable ¶
func (this *PeerEntityRoutingTable) MarkAllPeersIrreplaceable()
func (*PeerEntityRoutingTable) NPeersForCpl ¶
func (this *PeerEntityRoutingTable) NPeersForCpl(cpl uint) int
func (*PeerEntityRoutingTable) NearestPeer ¶
func (this *PeerEntityRoutingTable) NearestPeer(id kbucket.ID) peer.ID
func (*PeerEntityRoutingTable) NearestPeers ¶
func (*PeerEntityRoutingTable) PeerAdded ¶
func (this *PeerEntityRoutingTable) PeerAdded(peerAdded func(id peer.ID))
func (*PeerEntityRoutingTable) PeerRemoved ¶
func (this *PeerEntityRoutingTable) PeerRemoved(peerRemoved func(id peer.ID))
func (*PeerEntityRoutingTable) Print ¶
func (this *PeerEntityRoutingTable) Print()
func (*PeerEntityRoutingTable) RemovePeer ¶
func (this *PeerEntityRoutingTable) RemovePeer(p peer.ID)
func (*PeerEntityRoutingTable) ResetCplRefreshedAtForID ¶
func (this *PeerEntityRoutingTable) ResetCplRefreshedAtForID(id kbucket.ID, newTime time.Time)
func (*PeerEntityRoutingTable) Size ¶
func (this *PeerEntityRoutingTable) Size() int
func (*PeerEntityRoutingTable) TryAddPeer ¶
func (*PeerEntityRoutingTable) UpdateLastSuccessfulOutboundQueryAt ¶
func (*PeerEntityRoutingTable) UpdateLastUsefulAt ¶
Click to show internal directories.
Click to hide internal directories.