Help us shape the future of Go! Take the 2026 Go Developer Survey

tracker

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peers

type Peers interface {
	// Connected adds a new peer
	Connected(nodeID ids.NodeID)

	// Disconnected removes a peer
	Disconnected(nodeID ids.NodeID)

	// QueryFailed notifies the tracker that a query to a validator failed
	QueryFailed(nodeID ids.NodeID)

	// GetPeers returns the set of connected peers
	GetPeers() set.Set[ids.NodeID]
}

Peers tracks the peers that have been sent messages

type StartupTracker

type StartupTracker interface {
	Tracker

	// ShouldStart returns true if the startup process should start
	ShouldStart() bool
}

StartupTracker tracks the startup progress

type Tracker

type Tracker interface {
	// IsBootstrapped returns true if the chain is done bootstrapping
	IsBootstrapped() bool

	// Bootstrapped marks the chain as done bootstrapping
	Bootstrapped()

	// RegisterRequest registers an outstanding request
	RegisterRequest(nodeID ids.NodeID, requestID uint32, msgType string) (time.Time, bool)

	// RegisterResponse registers a response to a request
	RegisterResponse(nodeID ids.NodeID, requestID uint32, msgType string, latency time.Duration)
}

Tracker tracks the progress of operations

func NewTracker

func NewTracker() Tracker

NewTracker returns a new Tracker

Jump to

Keyboard shortcuts

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