libpod_data.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. //go:build !windows
  4. // +build !windows
  5. package podmanreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver"
  6. import "time"
  7. type container struct {
  8. AutoRemove bool
  9. Command []string
  10. Created string
  11. CreatedAt string
  12. ExitCode int
  13. Exited bool
  14. ExitedAt int
  15. ID string
  16. Image string
  17. ImageID string
  18. IsInfra bool
  19. Labels map[string]string
  20. Mounts []string
  21. Names []string
  22. Namespaces map[string]string
  23. Networks []string
  24. Pid int
  25. Pod string
  26. PodName string
  27. Ports []map[string]any
  28. Size map[string]string
  29. StartedAt int
  30. State string
  31. Status string
  32. }
  33. type event struct {
  34. ID string
  35. Status string
  36. }
  37. type containerStats struct {
  38. AvgCPU float64
  39. ContainerID string
  40. Name string
  41. PerCPU []uint64
  42. CPU float64
  43. CPUNano uint64
  44. CPUSystemNano uint64
  45. DataPoints int64
  46. SystemNano uint64
  47. MemUsage uint64
  48. MemLimit uint64
  49. MemPerc float64
  50. NetInput uint64
  51. NetOutput uint64
  52. BlockInput uint64
  53. BlockOutput uint64
  54. PIDs uint64
  55. UpTime time.Duration
  56. Duration uint64
  57. }
  58. type containerStatsReportError struct {
  59. Cause string
  60. Message string
  61. Response int64
  62. }
  63. type containerStatsReport struct {
  64. Error containerStatsReportError
  65. Stats []containerStats
  66. }