tracker

package
v1.22.25 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package tracker provides consensus tracking utilities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeTracker

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

TimeTracker tracks operation times

func NewTimeTracker

func NewTimeTracker() *TimeTracker

NewTimeTracker creates a new time tracker

func (*TimeTracker) IsTracked

func (t *TimeTracker) IsTracked(id ids.ID) bool

IsTracked checks if an operation is being tracked

func (*TimeTracker) Len

func (t *TimeTracker) Len() int

Len returns the number of tracked operations

func (*TimeTracker) Stop

func (t *TimeTracker) Stop(id ids.ID) time.Duration

Stop stops tracking an operation

func (*TimeTracker) Track

func (t *TimeTracker) Track(id ids.ID) time.Time

Track starts tracking an operation

type Tracker

type Tracker interface {
	// Track starts tracking an operation
	Track(id ids.ID) time.Time

	// Stop stops tracking an operation
	Stop(id ids.ID) time.Duration

	// IsTracked checks if an operation is being tracked
	IsTracked(id ids.ID) bool

	// Len returns the number of tracked operations
	Len() int
}

Tracker tracks consensus operations

Jump to

Keyboard shortcuts

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