misc

package
v0.0.0-...-229c351 Latest Latest
Warning

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

Go to latest
Published: May 15, 2015 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CGROUP_BLKIO uint8 = iota
	CGROUP_CPU
	CGROUP_CPUACCT
	CGROUP_CPUSET
	CGROUP_DEVICES
	CGROUP_FREEZER
	CGROUP_MEMORY
	CGROUP_NET_CLS
	CGROUP_NS
)

Variables

This section is empty.

Functions

func FindCgroupMount

func FindCgroupMount(subsystem string) (string, error)

func FindCgroups

func FindCgroups(mountpoint string) ([]string, error)

func InitializeMetrics

func InitializeMetrics(c Interface, m *metrics.MetricContext, prefix string, register bool)

InitializeMetrics initializes all Counters/Gauges types defined for the instance with Metrics Context by using reflection

func ParseFloat

func ParseFloat(in string) float64

func ParseUint

func ParseUint(in string) uint64

func ReadUintFromFile

func ReadUintFromFile(path string) uint64

func SetMetrics

func SetMetrics(m *metrics.MetricContext, s Interface, keys []string, values []string)

SetMetrics sets values for all counters/gauges defined

func UnregisterMetrics

func UnregisterMetrics(c Interface, m *metrics.MetricContext, prefix string)

UnregisterMetrics un-registers all counters/gauges defined for the instance

Types

type BitSize

type BitSize float64
const (
	Kb BitSize = 1 << (10 * iota)
	Mb
	Gb
	Tb
	Pb
	Eb
	Zb
	Yb
)

func (BitSize) String

func (b BitSize) String() string

type ByteSize

type ByteSize float64
const (
	KB ByteSize = 1 << (10 * iota)
	MB
	GB
	TB
	PB
	EB
	ZB
	YB
)

func (ByteSize) String

func (b ByteSize) String() string

type Interface

type Interface interface{}

Jump to

Keyboard shortcuts

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