monitor

package
v0.0.0-...-b3a00ce Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2014 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DST_HIGHER = iota
	DST_LOWER
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerMonitor

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

func NewContainerMonitor

func NewContainerMonitor(
	cadvisorUrl string,
	containerName string,
	cpuLowThreshold,
	cpuHighThreshold float64,
	sigChan chan<- *MonitorSignal,
) (*ContainerMonitor, error)

func (*ContainerMonitor) Stop

func (self *ContainerMonitor) Stop()

type ContainerTracker

type ContainerTracker interface {
	TrackContainer(id string) error
	StopTrackingContainer(id string) error
	GetTrackedContainer() string
}

func StartDockerMonitor

func StartDockerMonitor(
	cadvisorUrl string,
	cpuLowThreshold,
	cpuHighThreshold float64,
	sigChan chan<- *MonitorSignal,
) (ContainerTracker, error)

type DockerMonitor

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

func (*DockerMonitor) GetTrackedContainer

func (self *DockerMonitor) GetTrackedContainer() string

func (*DockerMonitor) StopTrackingContainer

func (self *DockerMonitor) StopTrackingContainer(id string) error

func (*DockerMonitor) TrackContainer

func (self *DockerMonitor) TrackContainer(id string) error

type MonitorSignal

type MonitorSignal struct {
	MoveDst       int
	ContainerName string
}

Jump to

Keyboard shortcuts

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