package tracker

import "github.com/ethereum/go-ethereum/p2p/tracker"

Index

Types

type Tracker

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

Tracker is a pending network request tracker to measure how much time it takes a remote peer to respond.

func New

func New(protocol string, timeout time.Duration) *Tracker

New creates a new network request tracker to monitor how much time it takes to fill certain requests and how individual peers perform.

func (*Tracker) Fulfil

func (t *Tracker) Fulfil(peer string, version uint, code uint64, id uint64)

Fulfil fills a pending request, if any is available, reporting on various metrics.

func (*Tracker) Track

func (t *Tracker) Track(peer string, version uint, reqCode uint64, resCode uint64, id uint64)

Track adds a network request to the tracker to wait for a response to arrive or until the request it cancelled or times out.

Source Files

tracker.go

Version
v1.16.1 (latest)
Published
Jul 2, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
1 day ago

Tools for package owners.