Documentation
¶
Overview ¶
Package load reads the load averages of the host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gohai ¶ added in v0.3.0
type Gohai struct {
// Sources are what the collector reads. A zero field is the real
// host's.
Sources source.Sources
}
Gohai reads the host's load averages with gohai's load collector, on every Linux family and on macOS.
func (*Gohai) GetAverageStats ¶ added in v0.3.0
GetAverageStats is the 1, 5 and 15 minute load averages.
type Provider ¶
type Provider interface {
// GetAverageStats retrieves the system load averages.
GetAverageStats() (*Result, error)
}
Provider implements the methods to interact with various Load components.
type Result ¶
type Result struct {
// Load average over the last 1 minute
Load1 float32
// Load average over the last 5 minutes
Load5 float32
// Load average over the last 15 minutes
Load15 float32
// Changed indicates whether system state was modified.
Changed bool `json:"changed"`
}
Result represents the system load averages over 1, 5, and 15 minutes.