ping

package
v0.27.6-block-uploads-... Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: AGPL-3.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const PingInterval = time.Minute
View Source
const PingTimeout = time.Second * 4

PingTimeout is maximum time to wait for a ping reply from a remote node

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New(
	log zerolog.Logger,
	idProvider id.IdentityProvider,
	idTranslator p2p.IDTranslator,
	me module.Local,
	metrics module.PingMetrics,
	pingEnabled bool,
	nodeInfoFile string,
	pingService network.PingService,
) (*Engine, error)

func (*Engine) Done

func (e *Engine) Done() <-chan struct{}

Done returns a done channel that is closed once the engine has fully stopped. For the ingestion engine, it only waits for all submit goroutines to end.

func (*Engine) Ready

func (e *Engine) Ready() <-chan struct{}

Ready returns a ready channel that is closed once the engine has fully started. For the ingestion engine, we consider the engine up and running upon initialization.

Jump to

Keyboard shortcuts

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