types_linux.go 889 B

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