Documentation ¶
Index ¶
Constants ¶
View Source
const GB = float32(1000000000)
Variables ¶
This section is empty.
Functions ¶
func GetAverage ¶
Types ¶
type AllStat ¶
type AllStat struct { CPU MultipleStat `json:"cpu"` RAM SingleStat `json:"ram"` Disk SingleStat `json:"disk"` }
func GetAllStats ¶
func GetAllStats(cpu MultipleStat, ram SingleStat, disk SingleStat) AllStat
type MultipleStat ¶
type MultipleStat struct { AverageUsagePercentage float32 `json:"averageUsagePercentage"` UsagePercentagePerCore []float32 `json:"usagePercentagePerCore"` }
func BuildCPUMultipleStat ¶
func BuildCPUMultipleStat(usagePercentagePerCore []float32) MultipleStat
func GetCPUStat ¶
func GetCPUStat() MultipleStat
type SingleStat ¶
type SingleStat struct { TotalGB float32 `json:"totalGB"` UsedGB float32 `json:"usedGB"` AvailableGB float32 `json:"availableGB"` UsagePercentage float32 `json:"usagePercentage"` }
func BuildDiskStat ¶
func BuildDiskStat(diskUsage disk.DiskUsageStat) SingleStat
func BuildRamStat ¶
func BuildRamStat(vm mem.VirtualMemoryStat) SingleStat
func GetDiskStat ¶
func GetDiskStat() SingleStat
func GetRAMStat ¶
func GetRAMStat() SingleStat
Click to show internal directories.
Click to hide internal directories.