Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryStorage ¶
type InMemoryStorage struct {
// contains filtered or unexported fields
}
func New ¶
func New( maxNumStats int, backend storage.StorageDriver, ) *InMemoryStorage
func (*InMemoryStorage) AddStats ¶
func (self *InMemoryStorage) AddStats(ref info.ContainerReference, stats *info.ContainerStats) error
func (*InMemoryStorage) Close ¶
func (self *InMemoryStorage) Close() error
func (*InMemoryStorage) RecentStats ¶
func (self *InMemoryStorage) RecentStats(name string, numStats int) ([]*info.ContainerStats, error)
type StatsBuffer ¶
type StatsBuffer struct {
// contains filtered or unexported fields
}
A circular buffer for ContainerStats.
func NewStatsBuffer ¶
func NewStatsBuffer(size int) *StatsBuffer
Returns a new thread-compatible StatsBuffer.
func (*StatsBuffer) Add ¶
func (self *StatsBuffer) Add(item *info.ContainerStats)
Adds an element to the start of the buffer (removing one from the end if necessary).
func (*StatsBuffer) FirstN ¶
func (self *StatsBuffer) FirstN(n int) []*info.ContainerStats
Returns the first N elements in the buffer. If N > size of buffer, size of buffer elements are returned.
func (*StatsBuffer) Size ¶
func (self *StatsBuffer) Size() int
Click to show internal directories.
Click to hide internal directories.