cadvisor: github.com/google/cadvisor/utils Index | Files | Directories

package utils

import "github.com/google/cadvisor/utils"

Index

Package Files

path.go timed_store.go utils.go

func FileExists Uses

func FileExists(file string) bool

func FixCpuMask Uses

func FixCpuMask(mask string, cores int) string

Returns a mask of all cores on the machine if the passed-in mask is empty.

type TimedStore Uses

type TimedStore struct {
    // contains filtered or unexported fields
}

A time-based buffer for ContainerStats. Holds information for a specific time period and/or a max number of items.

func NewTimedStore Uses

func NewTimedStore(age time.Duration, maxItems int) *TimedStore

Returns a new thread-compatible TimedStore. A maxItems value of -1 means no limit.

func (*TimedStore) Add Uses

func (s *TimedStore) Add(timestamp time.Time, item interface{})

Adds an element to the start of the buffer (removing one from the end if necessary).

func (*TimedStore) Get Uses

func (s *TimedStore) Get(index int) interface{}

Gets the element at the specified index. Note that elements are output in LIFO order.

func (*TimedStore) InTimeRange Uses

func (s *TimedStore) InTimeRange(start, end time.Time, maxResults int) []interface{}

Returns up to maxResult elements in the specified time period (inclusive). Results are from first to last. maxResults of -1 means no limit.

func (*TimedStore) Size Uses

func (s *TimedStore) Size() int

Directories

PathSynopsis
cloudinfo
cloudinfo/aws
cloudinfo/azure
cloudinfo/gce
container
cpuload
cpuload/netlink
cpuload/netlink/example
oomparser
oomparser/oomexample
sysfs
sysfs/fakesysfs
sysinfo

Package utils imports 4 packages (graph) and is imported by 889 packages. Updated 2020-06-24. Refresh now. Tools for package owners.