types_linux.go 815 B

12345678910111213141516171819202122232425262728293031
  1. package types // import "github.com/docker/docker/libcontainerd/types"
  2. import (
  3. "time"
  4. statsV1 "github.com/containerd/cgroups/stats/v1"
  5. specs "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 *statsV1.Metrics
  13. }
  14. // InterfaceToStats returns a stats object from the platform-specific interface.
  15. func InterfaceToStats(read time.Time, v interface{}) *Stats {
  16. return &Stats{
  17. Metrics: v.(*statsV1.Metrics),
  18. Read: read,
  19. }
  20. }
  21. // Resources defines updatable container resource values. TODO: it must match containerd upcoming API
  22. type Resources specs.LinuxResources
  23. // Checkpoints contains the details of a checkpoint
  24. type Checkpoints struct{}