Documentation
¶
Overview ¶
Package hostmon samples host CPU/RAM/disk for the read plane (plan §4). The parsing is pure and unit-tested cross-platform; the actual /proc + statfs reads are Linux-specific (the deploy target), with a no-op stub elsewhere so the binary still builds on a dev machine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupported = errors.New("hostmon: host metrics not supported on this platform")
ErrUnsupported is returned by Sample on non-Linux platforms.
Functions ¶
This section is empty.
Types ¶
type Sample ¶
type Sample struct {
CPUPercent float64
Load1 float64
MemTotal uint64
MemUsed uint64
DiskTotal uint64
DiskUsed uint64
}
Sample is one host metrics reading.
Click to show internal directories.
Click to hide internal directories.