node-api/docker/stats.go
Adam Štrauch 9348504f9e
Final touches
* Possibility to pass token in query param
* More appropriate names for gathering and resource updating functions
* Shorter measuring delay
* Container status available immediatelly when needed
2020-07-26 00:34:16 +02:00

20 lines
462 B
Go

package docker
// ContainerStats contains fields returned in docker stats function stream
type ContainerStats struct {
Pids struct {
Current int `json:"current"`
} `json:"pids_stats"`
CPU struct {
Usage struct {
Total int64 `json:"total_usage"`
} `json:"cpu_usage"`
} `json:"cpu_stats"`
Memory struct {
Usage int `json:"usage"`
MaxUsage int `json:"max_usage"`
Limit int `json:"limit"`
} `json:"memory_stats"`
ID string `json:"id"`
}