Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AverageStats ¶
type AverageStats 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 }
AverageStats represents the system load averages over 1, 5, and 15 minutes.
type Linux ¶
type Linux struct{}
Linux implements the Load interface for Linux.
func NewLinuxProvider ¶
func NewLinuxProvider() *Linux
NewLinuxProvider factory to create a new Linux instance.
func (*Linux) GetAverageStats ¶
func (l *Linux) GetAverageStats() (*AverageStats, error)
GetAverageStats returns the system's load averages over 1, 5, and 15 minutes. It returns a AverageStats struct with load over 1, 5, and 15 minutes, and an error if something goes wrong.
type Provider ¶
type Provider interface { // GetAverageStats retrieves the system load averages. GetAverageStats() (*AverageStats, error) }
Provider implements the methods to interact with various Load components.
type Ubuntu ¶
Ubuntu implements the Mem interface for Ubuntu.
func NewUbuntuProvider ¶
func NewUbuntuProvider() *Ubuntu
NewUbuntuProvider factory to create a new Ubuntu instance.
func (*Ubuntu) GetAverageStats ¶
func (u *Ubuntu) GetAverageStats() (*AverageStats, error)
GetAverageStats returns the system's load averages over 1, 5, and 15 minutes. It returns a AverageStats struct with load over 1, 5, and 15 minutes, and an error if something goes wrong.