types_linux.go 713 B

123456789101112131415161718192021222324252627282930
  1. package libcontainerd // import "github.com/docker/docker/libcontainerd"
  2. import (
  3. "time"
  4. "github.com/containerd/cgroups"
  5. "github.com/opencontainers/runtime-spec/specs-go"
  6. )
  7. // Summary is not used on linux
  8. type Summary struct{}
  9. // Stats holds metrics properties as returned by containerd
  10. type Stats struct {
  11. Read time.Time
  12. Metrics *cgroups.Metrics
  13. }
  14. func interfaceToStats(read time.Time, v interface{}) *Stats {
  15. return &Stats{
  16. Metrics: v.(*cgroups.Metrics),
  17. Read: read,
  18. }
  19. }
  20. // Resources defines updatable container resource values. TODO: it must match containerd upcoming API
  21. type Resources specs.LinuxResources
  22. // Checkpoints contains the details of a checkpoint
  23. type Checkpoints struct{}