metric

package
v0.0.0-...-67ef099 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRunner

func NewRunner(dockerEndpoint string, interval time.Duration, metricsBackend string) *runner

func Register

func Register(name string, b backendFactory)

Register registers a new Backend

Types

type Backend

type Backend interface {
	Send(container ContainerInfo, key string, value interface{}) error
	SendConn(container ContainerInfo, host string) error
	SendHost(host HostInfo, key string, value interface{}) error
}

func Get

func Get(name string) (Backend, error)

Get gets the named backend

type ContainerInfo

type ContainerInfo struct {
	Name     string
	Image    string
	Hostname string
	App      string
	Process  string
	Labels   map[string]string
}

func NewContainerInfo

func NewContainerInfo(container *container.Container) ContainerInfo

type HostClient

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

func NewHostClient

func NewHostClient() (*HostClient, error)

func (*HostClient) GetHostMetrics

func (h *HostClient) GetHostMetrics() ([]map[string]float, error)

func (*HostClient) GetHostname

func (h *HostClient) GetHostname() (string, error)

type HostInfo

type HostInfo struct {
	Name  string
	Addrs []string
}

type Reporter

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

func (*Reporter) Do

func (r *Reporter) Do()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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