change agent file structure

This commit is contained in:
TOomaAh
2024-08-09 17:52:02 +02:00
parent d840178cc0
commit 034a5c21eb
8 changed files with 281 additions and 297 deletions

View File

@@ -1,5 +1,29 @@
package container
import "time"
type Container struct {
Id string
IdShort string
Names []string
Status string
// Image string
// ImageID string
// Command string
// Created int64
// Ports []Port
// SizeRw int64 `json:",omitempty"`
// SizeRootFs int64 `json:",omitempty"`
// Labels map[string]string
// State string
// HostConfig struct {
// NetworkMode string `json:",omitempty"`
// Annotations map[string]string `json:",omitempty"`
// }
// NetworkSettings *SummaryNetworkSettings
// Mounts []MountPoint
}
type ContainerStats struct {
Name string `json:"n"`
Cpu float64 `json:"c"`
@@ -7,3 +31,12 @@ type ContainerStats struct {
NetworkSent float64 `json:"ns"`
NetworkRecv float64 `json:"nr"`
}
type PrevContainerStats struct {
Cpu [2]uint64
Net struct {
Sent uint64
Recv uint64
Time time.Time
}
}