factory

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgsConnectionMonitorFactory

type ArgsConnectionMonitorFactory struct {
	Reconnecter                p2p.Reconnecter
	Sharder                    p2p.CommonSharder
	ThresholdMinConnectedPeers int
	TargetCount                int
}

ArgsConnectionMonitorFactory represents the argument for the connection monitor factory

type ConnectionMonitor

type ConnectionMonitor interface {
	network.Notifiee
	IsConnectedToTheNetwork(netw network.Network) bool
	SetThresholdMinConnectedPeers(thresholdMinConnectedPeers int, netw network.Network)
	ThresholdMinConnectedPeers() int
	IsInterfaceNil() bool
}

ConnectionMonitor defines the behavior of a connection monitor

func NewConnectionMonitor

func NewConnectionMonitor(arg ArgsConnectionMonitorFactory) (ConnectionMonitor, error)

NewConnectionMonitor creates a new ConnectionMonitor instance

Jump to

Keyboard shortcuts

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