tracker

package
v1.22.41 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUTracker

type CPUTracker interface {
	// Usage returns the current CPU usage for a given node at the given time
	Usage(nodeID ids.NodeID, now time.Time) float64
	// TimeUntilUsage returns the duration until CPU usage drops to the given value
	TimeUntilUsage(nodeID ids.NodeID, now time.Time, value float64) time.Duration
}

CPUTracker tracks CPU resource usage per peer

type DiskTracker

type DiskTracker interface {
	// Usage returns the current disk usage for a given node at the given time
	Usage(nodeID ids.NodeID, now time.Time) float64
	// TimeUntilUsage returns the duration until disk usage drops to the given value
	TimeUntilUsage(nodeID ids.NodeID, now time.Time, value float64) time.Duration
}

DiskTracker tracks disk resource usage per peer

type ResourceTracker

type ResourceTracker interface {
	// CPUTracker returns the CPU usage tracker
	CPUTracker() CPUTracker
	// DiskTracker returns the disk usage tracker
	DiskTracker() DiskTracker
}

ResourceTracker manages CPU and disk resource tracking

type Targeter added in v1.22.26

type Targeter interface {
	// TargetUsage returns the target usage threshold
	TargetUsage() uint64
}

Targeter determines target resource usage thresholds

type Tracker

type Tracker interface {
	// Usage returns the current usage for a given node at the given time
	Usage(nodeID ids.NodeID, now time.Time) float64
	// TimeUntilUsage returns the duration until the usage drops to the given value
	TimeUntilUsage(nodeID ids.NodeID, now time.Time, value float64) time.Duration
	// TotalUsage returns the total usage across all nodes
	TotalUsage() float64
}

Tracker tracks system resource usage caused by each peer

Jump to

Keyboard shortcuts

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