reconnect

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: LGPL-3.0 Imports: 8 Imported by: 0

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

Jump to

Keyboard shortcuts

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