Documentation ¶
Index ¶
Constants ¶
View Source
const ( // B to byte B = 1 // KB to B KB = 1024 * B // MB to KB MB = 1024 * KB // GB to MB GB = 1024 * MB )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUHealth ¶
type CPUHealth struct { Health CPUCores int `json:"cpuCores"` LoadAverage1 float64 `json:"loadAverage1"` LoadAverage5 float64 `json:"loadAverage5"` LoadAverage15 float64 `json:"loadAverage15"` }
CPUHealth includes CPU cores, load average for one minutes, load average for five minutes, load average for fifteen minutes and health status
func (*CPUHealth) GetHealthStatusByCores ¶
GetHealthStatusByCores only fot CPU check; get health status by CPU cores
type DiskHealth ¶
type DiskHealth struct { Health HealthPercent Used string `json:"used"` Total string `json:"total"` }
DiskHealth includes used disk, total disk, used percent and health status
type Health ¶
type Health struct {
HealthStatus string `json:"healthStatus"`
}
Health basic struct include health status
type HealthPercent ¶
type HealthPercent struct {
UsedPercent int `json:"usedPercent"`
}
HealthPercent include health percentage
func (*HealthPercent) GetHealthStatusByPercent ¶
func (h *HealthPercent) GetHealthStatusByPercent() string
GetHealthStatusByPercent get health status by percentage
type RAMHealth ¶
type RAMHealth struct { Health HealthPercent Used string `json:"used"` Total string `json:"total"` }
RAMHealth includes used RAM, total RAM, used percent and health status
Click to show internal directories.
Click to hide internal directories.