Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUUser ¶
type CPUUser interface {
// CPUUsage returns the number of CPU cores of usage this user has attributed
// to it.
//
// For example, if this user is reporting a process's CPU utilization and
// that process is currently using 150% CPU (i.e. one and a half cores of
// compute) then the return value will be 1.5.
CPUUsage() float64
}
type Manager ¶
type Manager interface {
User
ProcessTracker
// Shutdown allocated resources and stop tracking all processes.
Shutdown()
}
func NewManager ¶
func NewManager( log logging.Logger, diskPath string, frequency, cpuHalflife, diskHalflife time.Duration, metricsRegisterer prometheus.Registerer, ) (Manager, error)
type ProcessTracker ¶
type ProcessTracker interface {
// TrackProcess adds [pid] to the list of processes that this tracker is
// currently managing. Duplicate requests are dropped.
TrackProcess(pid int)
// UntrackProcess removes [pid] from the list of processes that this tracker
// is currently managing. Untracking a currently untracked [pid] is a noop.
UntrackProcess(pid int)
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package resourcemock is a generated GoMock package.
|
Package resourcemock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.