Documentation ¶
Overview ¶
Package loadAvg gets loadavg information from the /proc/loadavg file. Instead of returning a Go struct, it returns Flatbuffer serialized bytes. A function to deserialize the Flatbuffer serialized bytes into a loadavg.LoadAvg struct is provided.
Note: the package name is loadavg and not the final element of the import path (flat).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
Deserialize takes some Flatbuffer serialized bytes and deserializes them as loadavg.LoadAvg.
func Get ¶
Get returns the current loadavg information as Flatbuffer serialized bytes using the package's global Profiler.
func NewTicker ¶
NewTicker returns a new Ticker containing a Data channel that delivers the data at intervals and an error channel that delivers any errors encountered. Stop the ticker to signal the ticker to stop running. Stopping the ticker does not close the Data channel; call Close to close both the ticker and the data channel.