container.go 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package kubemodel
  2. import "time"
  3. // TODO complete
  4. // TODO (start, end) here, or defer to Pod?
  5. // TODO how to handle network bytes?
  6. // TODO how to handle GPUs?
  7. // TODO how to handle storage?
  8. // TODO how to handle devices?
  9. // TODO uint64 or float64 for numbers?
  10. type Container struct {
  11. UID string
  12. PodUID string
  13. Name string
  14. Start time.Time
  15. End time.Time
  16. CPUAllocationMillicoreSeconds uint64
  17. CPURequestMillicoreAverage uint64
  18. CPULimitMillicoreAverage uint64
  19. CPUUsageMillicoreAverage uint64
  20. CPUUsageMillicoreMax uint64
  21. RAMAllocationByteSeconds uint64
  22. RAMRequestByteAverage uint64
  23. RAMLimitByteAverage uint64
  24. RAMUsageByteAverage uint64
  25. RAMUsageByteMax uint64
  26. PVCMounts map[string]*MountedVolume
  27. }
  28. type MountedVolume struct {
  29. PersistentVolumeClaimUID string
  30. Name string
  31. StorageCapacityBytes uint64
  32. }