2016-03-18 14:50:19 -04:00
|
|
|
package libcontainerd
|
|
|
|
|
|
|
|
import (
|
2017-09-22 09:52:41 -04:00
|
|
|
"time"
|
2016-03-18 14:50:19 -04:00
|
|
|
|
2017-09-22 09:52:41 -04:00
|
|
|
"github.com/containerd/cgroups"
|
|
|
|
specs "github.com/opencontainers/runtime-spec/specs-go"
|
|
|
|
)
|
2016-03-18 14:50:19 -04:00
|
|
|
|
2017-09-22 09:52:41 -04:00
|
|
|
// Summary is not used on linux
|
|
|
|
type Summary struct{}
|
2016-04-01 20:02:38 -04:00
|
|
|
|
2017-09-22 09:52:41 -04:00
|
|
|
// Stats holds metrics properties as returned by containerd
|
|
|
|
type Stats struct {
|
|
|
|
Read time.Time
|
|
|
|
Metrics *cgroups.Metrics
|
2016-04-01 20:02:38 -04:00
|
|
|
}
|
|
|
|
|
2017-09-22 09:52:41 -04:00
|
|
|
func interfaceToStats(read time.Time, v interface{}) *Stats {
|
|
|
|
return &Stats{
|
|
|
|
Metrics: v.(*cgroups.Metrics),
|
|
|
|
Read: read,
|
|
|
|
}
|
|
|
|
}
|
2016-03-20 18:58:23 -04:00
|
|
|
|
2017-09-22 09:52:41 -04:00
|
|
|
// Resources defines updatable container resource values. TODO: it must match containerd upcoming API
|
|
|
|
type Resources specs.LinuxResources
|
2016-05-12 10:52:00 -04:00
|
|
|
|
|
|
|
// Checkpoints contains the details of a checkpoint
|
2017-09-22 09:52:41 -04:00
|
|
|
type Checkpoints struct{}
|