summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/containerstate.go10
-rw-r--r--libpod/define/pod_inspect.go12
2 files changed, 21 insertions, 1 deletions
diff --git a/libpod/define/containerstate.go b/libpod/define/containerstate.go
index 5d2bc9099..fc272beaa 100644
--- a/libpod/define/containerstate.go
+++ b/libpod/define/containerstate.go
@@ -1,6 +1,10 @@
package define
-import "github.com/pkg/errors"
+import (
+ "time"
+
+ "github.com/pkg/errors"
+)
// ContainerStatus represents the current state of a container
type ContainerStatus int
@@ -120,12 +124,14 @@ func (s ContainerExecStatus) String() string {
// ContainerStats contains the statistics information for a running container
type ContainerStats struct {
+ AvgCPU float64
ContainerID string
Name string
PerCPU []uint64
CPU float64
CPUNano uint64
CPUSystemNano uint64
+ DataPoints int64
SystemNano uint64
MemUsage uint64
MemLimit uint64
@@ -135,4 +141,6 @@ type ContainerStats struct {
BlockInput uint64
BlockOutput uint64
PIDs uint64
+ UpTime time.Duration
+ Duration uint64
}
diff --git a/libpod/define/pod_inspect.go b/libpod/define/pod_inspect.go
index 2fa91166f..67f075b3c 100644
--- a/libpod/define/pod_inspect.go
+++ b/libpod/define/pod_inspect.go
@@ -51,6 +51,12 @@ type InspectPodData struct {
// Containers gives a brief summary of all containers in the pod and
// their current status.
Containers []InspectPodContainerInfo `json:"Containers,omitempty"`
+ // CPUPeriod contains the CPU period of the pod
+ CPUPeriod uint64 `json:"cpu_period,omitempty"`
+ // CPUQuota contains the CPU quota of the pod
+ CPUQuota int64 `json:"cpu_quota,omitempty"`
+ // CPUSetCPUs contains linux specific CPU data for the pod
+ CPUSetCPUs string `json:"cpuset_cpus,omitempty"`
}
// InspectPodInfraConfig contains the configuration of the pod's infra
@@ -91,6 +97,12 @@ type InspectPodInfraConfig struct {
Networks []string
// NetworkOptions are additional options for each network
NetworkOptions map[string][]string
+ // CPUPeriod contains the CPU period of the pod
+ CPUPeriod uint64 `json:"cpu_period,omitempty"`
+ // CPUQuota contains the CPU quota of the pod
+ CPUQuota int64 `json:"cpu_quota,omitempty"`
+ // CPUSetCPUs contains linux specific CPU data for the container
+ CPUSetCPUs string `json:"cpuset_cpus,omitempty"`
}
// InspectPodContainerInfo contains information on a container in a pod.