tracker

package
v0.0.0-...-84b6be9 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Jump to

Keyboard shortcuts

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