Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActualMemoryMetrics ¶
type ActualMemoryMetrics struct { Free opt.Uint `struct:"free,omitempty"` Used UsedMemStats `struct:"used,omitempty"` }
ActualMemoryMetrics wraps the actual.* memory metrics
type Memory ¶
type Memory struct { Total opt.Uint `struct:"total,omitempty"` Used UsedMemStats `struct:"used,omitempty"` Free opt.Uint `struct:"free,omitempty"` Cached opt.Uint `struct:"cached,omitempty"` // "Actual" values are, technically, a linux-only concept // For better or worse we've expanded it to include "derived" // Memory values on other platforms, which we should // probably keep for the sake of backwards compatibility // However, because the derived value varies from platform to platform, // We may want to more precisely document what these mean. Actual ActualMemoryMetrics `struct:"actual,omitempty"` // Swap metrics Swap SwapMetrics `struct:"swap,omitempty"` }
Memory holds os-specifc memory usage data The vast majority of these values are cross-platform However, we're wrapping all them for the sake of safety, and for the more variable swap metrics
type SwapMetrics ¶
type SwapMetrics struct { Total opt.Uint `struct:"total,omitempty"` Used UsedMemStats `struct:"used,omitempty"` Free opt.Uint `struct:"free,omitempty"` }
SwapMetrics wraps swap.* memory metrics
func (SwapMetrics) IsZero ¶
func (swap SwapMetrics) IsZero() bool
IsZero implements the zeroer interface for structform's folders
type UsedMemStats ¶
type UsedMemStats struct { Pct opt.Float `struct:"pct,omitempty"` Bytes opt.Uint `struct:"bytes,omitempty"` }
UsedMemStats wraps used.* memory metrics
func (UsedMemStats) IsZero ¶
func (used UsedMemStats) IsZero() bool
IsZero implements the zeroer interface for structform's folders
Click to show internal directories.
Click to hide internal directories.