Documentation ¶
Index ¶
Constants ¶
View Source
const MaxRetryCountForReserveNode = 100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReconnectPeerInfo ¶
type ReconnectPeerInfo struct {
// contains filtered or unexported fields
}
type ReconnectService ¶
type ReconnectService struct { sync.RWMutex MaxRetryCount int RetryAddrs map[string]*ReconnectPeerInfo // contains filtered or unexported fields }
ReconnectService contain addr need to reconnect
func NewReconectService ¶
func NewReconectService(net p2p.P2P, staticReserveFilter p2p.AddressFilter) *ReconnectService
func (*ReconnectService) OnAddPeer ¶
func (self *ReconnectService) OnAddPeer(p *peer.PeerInfo)
func (*ReconnectService) OnDelPeer ¶
func (self *ReconnectService) OnDelPeer(p *peer.PeerInfo)
func (*ReconnectService) ReconnectCount ¶
func (self *ReconnectService) ReconnectCount() int
func (*ReconnectService) Start ¶
func (self *ReconnectService) Start()
func (*ReconnectService) Stop ¶
func (self *ReconnectService) Stop()
Click to show internal directories.
Click to hide internal directories.