Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Linux ¶
type Linux struct{}
Linux implements the Mem interface for Linux.
func NewLinuxProvider ¶
func NewLinuxProvider() *Linux
NewLinuxProvider factory to create a new Linux instance.
type Provider ¶
type Provider interface { // GetStats retrieves memory statistics of the system. GetStats() (*Stats, error) }
Provider implements the methods to interact with various Mem components.
type Stats ¶
type Stats struct { // Total memory in bytes Total uint64 // Free memory in bytes Free uint64 // Cached memory in bytes Cached uint64 }
Stats holds memory information in bytes.
type Ubuntu ¶
type Ubuntu struct {
VirtualMemoryFn func() (*mem.VirtualMemoryStat, error)
}
Ubuntu implements the Mem interface for Ubuntu.
func NewUbuntuProvider ¶
func NewUbuntuProvider() *Ubuntu
NewUbuntuProvider factory to create a new Ubuntu instance.
Click to show internal directories.
Click to hide internal directories.