29 lines
589 B
Go
29 lines
589 B
Go
package drivers
|
|
|
|
// MemoryUsage holds live RAM stats from /proc/meminfo
|
|
type MemoryUsage struct {
|
|
TotalGB float64
|
|
AvailableGB float64
|
|
UsedGB float64
|
|
UsedPercent float64
|
|
}
|
|
|
|
type UsageDriver interface {
|
|
ReadUsageSensors() (MemoryUsage, error)
|
|
}
|
|
|
|
// MemoryHardware holds physical RAM slot and module details
|
|
type MemoryHardware struct {
|
|
MaxCapacityGB float64
|
|
TotalSlots int
|
|
SlotsUsed int
|
|
Generations []string
|
|
Speeds []string
|
|
FormFactors []string
|
|
ModelNames []string
|
|
}
|
|
|
|
type HardwareDriver interface {
|
|
ReadHardwareSensors() (MemoryHardware, error)
|
|
}
|