 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
      Index ¶
- type ContainerStats
- type FormattedStatsEntry
- type Stats
- type StatsEntry
- func (s *StatsEntry) BlockIO() string
- func (s *StatsEntry) CPUPerc() string
- func (s *StatsEntry) EntryID(noTrunc bool) string
- func (s *StatsEntry) EntryName() string
- func (s *StatsEntry) MemPerc() string
- func (s *StatsEntry) MemUsage() string
- func (s *StatsEntry) NetIO() string
- func (s *StatsEntry) PIDs() string
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerStats ¶ added in v0.22.1
type ContainerStats struct {
	Time                        time.Time
	CgroupCPU, Cgroup2CPU       uint64
	CgroupSystem, Cgroup2System uint64
}
    ContainerStats represents the runtime container stats
type FormattedStatsEntry ¶
type FormattedStatsEntry struct {
	Name     string
	ID       string
	CPUPerc  string
	MemUsage string
	MemPerc  string
	NetIO    string
	BlockIO  string
	PIDs     string
}
    FormattedStatsEntry represents a formatted StatsEntry
func RenderEntry ¶
func RenderEntry(in *StatsEntry, noTrunc bool) FormattedStatsEntry
Rendering a FormattedStatsEntry from StatsEntry
type Stats ¶
type Stats struct {
	StatsEntry
	// contains filtered or unexported fields
}
    Stats represents an entity to store containers statistics synchronously
func NewStats ¶
NewStats is from https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/command/container/formatter_stats.go#L113-L116
func (*Stats) GetError ¶
GetError is from https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/command/container/formatter_stats.go#L51-L57
func (*Stats) GetStatistics ¶
func (cs *Stats) GetStatistics() StatsEntry
GetStatistics is from https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/command/container/formatter_stats.go#L95-L100
func (*Stats) SetError ¶
SetError is from https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/command/container/formatter_stats.go#L77-L85
func (*Stats) SetErrorAndReset ¶
SetErrorAndReset is from https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/command/container/formatter_stats.go#L59-L75
func (*Stats) SetStatistics ¶
func (cs *Stats) SetStatistics(s StatsEntry)
SetStatistics is from https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/command/container/formatter_stats.go#L87-L93
type StatsEntry ¶
type StatsEntry struct {
	Container        string
	Name             string
	ID               string
	CPUPercentage    float64
	Memory           float64
	MemoryLimit      float64
	MemoryPercentage float64
	NetworkRx        float64
	NetworkTx        float64
	BlockRead        float64
	BlockWrite       float64
	PidsCurrent      uint64
	IsInvalid        bool
}
    StatsEntry represents the statistics data collected from a container
func SetCgroup2StatsFields ¶
func SetCgroup2StatsFields(previousStats *ContainerStats, metrics *v2.Metrics, links []netlink.Link) (StatsEntry, error)
func SetCgroupStatsFields ¶
func SetCgroupStatsFields(previousStats *ContainerStats, data *v1.Metrics, links []netlink.Link) (StatsEntry, error)
func (*StatsEntry) BlockIO ¶
func (s *StatsEntry) BlockIO() string
func (*StatsEntry) CPUPerc ¶
func (s *StatsEntry) CPUPerc() string
func (*StatsEntry) EntryID ¶
func (s *StatsEntry) EntryID(noTrunc bool) string
func (*StatsEntry) EntryName ¶
func (s *StatsEntry) EntryName() string
a set of functions to format container stats
func (*StatsEntry) MemPerc ¶
func (s *StatsEntry) MemPerc() string
func (*StatsEntry) MemUsage ¶
func (s *StatsEntry) MemUsage() string
func (*StatsEntry) NetIO ¶
func (s *StatsEntry) NetIO() string
func (*StatsEntry) PIDs ¶
func (s *StatsEntry) PIDs() string