change types and add pending

This commit is contained in:
Henry Dollman
2024-07-14 18:42:36 -04:00
parent 0af3138ef7
commit ef3a24325c
4 changed files with 66 additions and 27 deletions

View File

@@ -7,25 +7,40 @@ import (
type Server struct {
Host string
Port string
Status string
Client *ssh.Client
}
type SystemData struct {
System SystemStats `json:"stats"`
Stats SystemStats `json:"stats"`
Info SystemInfo `json:"info"`
Containers []ContainerStats `json:"container"`
}
type SystemStats struct {
Cpu float64 `json:"c"`
Mem float64 `json:"m"`
MemUsed float64 `json:"mu"`
type SystemInfo struct {
Cores int `json:"c"`
Threads int `json:"t"`
CpuModel string `json:"m"`
Os string `json:"o"`
Uptime uint64 `json:"u"`
Cpu float64 `json:"cpu"`
MemPct float64 `json:"mp"`
MemBuf float64 `json:"mb"`
Disk float64 `json:"d"`
DiskUsed float64 `json:"du"`
DiskPct float64 `json:"dp"`
}
type SystemStats struct {
Cpu float64 `json:"cpu"`
Mem float64 `json:"m"`
MemUsed float64 `json:"mu"`
MemPct float64 `json:"mp"`
MemBuffCache float64 `json:"mb"`
Disk float64 `json:"d"`
DiskUsed float64 `json:"du"`
DiskPct float64 `json:"dp"`
DiskRead float64 `json:"dr"`
DiskWrite float64 `json:"dw"`
}
type ContainerStats struct {
Name string `json:"n"`
Cpu float64 `json:"c"`