routingtable

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

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) Find

func (this *PeerEntityRoutingTable) Find(id peer.ID) peer.ID

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 (this *PeerEntityRoutingTable) NearestPeers(id kbucket.ID, count int) []peer.ID

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 (this *PeerEntityRoutingTable) TryAddPeer(p peer.ID, queryPeer bool, isReplaceable bool) (bool, error)

func (*PeerEntityRoutingTable) UpdateLastSuccessfulOutboundQueryAt

func (this *PeerEntityRoutingTable) UpdateLastSuccessfulOutboundQueryAt(p peer.ID, t time.Time) bool

func (*PeerEntityRoutingTable) UpdateLastUsefulAt

func (this *PeerEntityRoutingTable) UpdateLastUsefulAt(p peer.ID, t time.Time) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL