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

timeout

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// RegisterRequest registers a request and returns the time it was registered
	RegisterRequest(nodeID ids.NodeID, chainID ids.ID, requestID uint32, responseOp message.Op, timeoutMsg message.InboundMessage, engineType p2p.EngineType) time.Time

	// RegisterResponse registers that a response was received
	RegisterResponse(nodeID ids.NodeID, chainID ids.ID, requestID uint32, responseOp message.Op, latency time.Duration) (time.Time, bool)

	// TimeoutDuration returns the current timeout duration
	TimeoutDuration() time.Duration

	// Stop stops the timeout manager
	Stop()
}

Manager manages request timeouts

func NewManager

func NewManager(config *timer.AdaptiveTimeoutConfig, reg prometheus.Registerer) (Manager, error)

NewManager returns a new timeout manager

Jump to

Keyboard shortcuts

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