utils

package
v0.27.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(file string) bool

func FixCpuMask

func FixCpuMask(mask string, cores int) string

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

Types

type TimedStore

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

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

func (self *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

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

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

func (*TimedStore) InTimeRange

func (self *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

func (self *TimedStore) Size() int

Directories

Path Synopsis
netlink/example command
oomexample command
procfs contains several low level functions to read information from /proc filesystem, and also provides some utility functions like JiffiesToDuration.
procfs contains several low level functions to read information from /proc filesystem, and also provides some utility functions like JiffiesToDuration.
Package tail implements "tail -F" functionality following rotated logs
Package tail implements "tail -F" functionality following rotated logs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL