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
Click to show internal directories.
Click to hide internal directories.