Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStatsFormat ¶
NewStatsFormat returns a format for rendering an CStatsContext
Types ¶
type Stats ¶
type Stats struct { StatsEntry // contains filtered or unexported fields }
Stats represents an entity to store containers statistics synchronously
func (*Stats) GetError ¶
GetError returns the container statistics error. This is used to determine whether the statistics are valid or not
func (*Stats) GetStatistics ¶
func (cs *Stats) GetStatistics() StatsEntry
GetStatistics returns container statistics with other meta data such as the container name
func (*Stats) SetErrorAndReset ¶
SetErrorAndReset zeroes all the container statistics and store the error. It is used when receiving time out error during statistics collecting to reduce lock overhead
func (*Stats) SetStatistics ¶
func (cs *Stats) SetStatistics(s StatsEntry)
SetStatistics set the container statistics
type StatsEntry ¶
type StatsEntry struct { Container string Name string ID string CPUPercentage float64 Memory float64 // On Windows this is the private working set MemoryLimit float64 // Not used on Windows MemoryPercentage float64 // Not used on Windows NetworkRx float64 NetworkTx float64 BlockRead float64 BlockWrite float64 PidsCurrent uint64 // Not used on Windows IsInvalid bool }
StatsEntry represents represents the statistics data collected from a container
Click to show internal directories.
Click to hide internal directories.