Versions in this module Expand all Collapse all v1 v1.4.1 Dec 1, 2021 v1.4.0 Sep 10, 2021 Changes in this version + func GetCPULoad(ctx context.Context, cpuLoad *CPULoad, dataChannel chan *CPULoad, ...) error + func GetCPURates() ([]float64, error) + func GlobalStats(ctx context.Context, dataChannel chan AggregatedMetrics, refreshRate uint64) error + func ServeBattery(ctx context.Context, cpuChannel chan AggregatedMetrics) error + func ServeCPURates(ctx context.Context, cpuChannel chan AggregatedMetrics) error + func ServeDiskRates(ctx context.Context, dataChannel chan AggregatedMetrics) error + func ServeInfo(ctx context.Context, cpuChannel chan AggregatedMetrics) error + func ServeMemRates(ctx context.Context, dataChannel chan AggregatedMetrics) error + func ServeNetRates(ctx context.Context, dataChannel chan AggregatedMetrics) error + func ServeTemperatureRates(ctx context.Context, dataChannel chan AggregatedMetrics) error + type AggregatedMetrics struct + BatteryPercent int + CPUStats []float64 + DiskStats [][]string + FieldSet string + HostInfo [][]string + MemStats []float64 + NetStats map[string][]float64 + TempStats [][]string + type CPULoad struct + CPURates [][]string + Gnice int + Guest int + Idle int + Iowait int + Irq int + Nice int + Soft int + Steal int + Sys int + Usr int + func NewCPULoad() *CPULoad + func (c *CPULoad) UpdateCPULoad() error