Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DurationBetweenReconnectAttempts = time.Second * 5
DurationBetweenReconnectAttempts is used as to not call reconnecter.ReconnectToNetwork() too often when there are a lot of peers disconnecting and reconnection to initial nodes succeeds
Functions ¶
func NewLibp2pConnectionMonitorSimple ¶
func NewLibp2pConnectionMonitorSimple(args ArgsConnectionMonitorSimple) (*libp2pConnectionMonitorSimple, error)
NewLibp2pConnectionMonitorSimple creates a new connection monitor (version 2 that is more streamlined and does not care about pausing and resuming the discovery process)
Types ¶
type ArgsConnectionMonitorSimple ¶ added in v1.3.29
type ArgsConnectionMonitorSimple struct { Reconnecter p2p.Reconnecter ThresholdMinConnectedPeers uint32 Sharder Sharder PreferredPeersHolder p2p.PreferredPeersHolderHandler ConnectionsWatcher p2p.ConnectionsWatcher }
ArgsConnectionMonitorSimple is the DTO used in the NewLibp2pConnectionMonitorSimple constructor function
Click to show internal directories.
Click to hide internal directories.