metrics

package
v0.0.0-...-eaac079 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	Stream() chan Metrics
	Running() bool
	Start()
	Stop()
}

type Docker

type Docker struct {
	Metrics
	// contains filtered or unexported fields
}

Docker collector

func NewDocker

func NewDocker(client *api.Client, id string) *Docker

func (*Docker) ReadCPU

func (c *Docker) ReadCPU(stats *api.Stats)

func (*Docker) ReadMem

func (c *Docker) ReadMem(stats *api.Stats)

func (*Docker) ReadNet

func (c *Docker) ReadNet(stats *api.Stats)

func (*Docker) Running

func (c *Docker) Running() bool

func (*Docker) Start

func (c *Docker) Start()

func (*Docker) Stop

func (c *Docker) Stop()

Stop collector

func (*Docker) Stream

func (c *Docker) Stream() chan Metrics

type Metrics

type Metrics struct {
	CPUUtil    int
	NetTx      int64
	NetRx      int64
	MemLimit   int64
	MemPercent int
	MemUsage   int64
}

func NewMetrics

func NewMetrics() Metrics

type Mock

type Mock struct {
	Metrics
	// contains filtered or unexported fields
}

Mock collector

func NewMock

func NewMock(a int64) *Mock

func (*Mock) Running

func (c *Mock) Running() bool

func (*Mock) Start

func (c *Mock) Start()

func (*Mock) Stop

func (c *Mock) Stop()

func (*Mock) Stream

func (c *Mock) Stream() chan Metrics

Jump to

Keyboard shortcuts

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