cadvisor

package
v0.20.1-0...-1c0b765 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2015 License: Apache-2.0 Imports: 14 Imported by: 0 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

Overview

Kubelet interactions with cAdvisor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

type Fake struct {
}

Fake cAdvisor implementation.

func (*Fake) ContainerInfo

func (c *Fake) ContainerInfo(name string, req *cadvisorApi.ContainerInfoRequest) (*cadvisorApi.ContainerInfo, error)

func (*Fake) DockerContainer

func (c *Fake) DockerContainer(name string, req *cadvisorApi.ContainerInfoRequest) (cadvisorApi.ContainerInfo, error)

func (*Fake) DockerImagesFsInfo

func (c *Fake) DockerImagesFsInfo() (cadvisorApiV2.FsInfo, error)

func (*Fake) MachineInfo

func (c *Fake) MachineInfo() (*cadvisorApi.MachineInfo, error)

func (*Fake) RootFsInfo

func (c *Fake) RootFsInfo() (cadvisorApiV2.FsInfo, error)

func (*Fake) Start

func (c *Fake) Start() error

func (*Fake) SubcontainerInfo

func (c *Fake) SubcontainerInfo(name string, req *cadvisorApi.ContainerInfoRequest) (map[string]*cadvisorApi.ContainerInfo, error)

func (*Fake) VersionInfo

func (c *Fake) VersionInfo() (*cadvisorApi.VersionInfo, error)

func (*Fake) WatchEvents

func (c *Fake) WatchEvents(request *events.Request) (*events.EventChannel, error)

type Interface

type Interface interface {
	Start() error
	DockerContainer(name string, req *cadvisorApi.ContainerInfoRequest) (cadvisorApi.ContainerInfo, error)
	ContainerInfo(name string, req *cadvisorApi.ContainerInfoRequest) (*cadvisorApi.ContainerInfo, error)
	SubcontainerInfo(name string, req *cadvisorApi.ContainerInfoRequest) (map[string]*cadvisorApi.ContainerInfo, error)
	MachineInfo() (*cadvisorApi.MachineInfo, error)

	VersionInfo() (*cadvisorApi.VersionInfo, error)

	// Returns usage information about the filesystem holding Docker images.
	DockerImagesFsInfo() (cadvisorApiV2.FsInfo, error)

	// Returns usage information about the root filesystem.
	RootFsInfo() (cadvisorApiV2.FsInfo, error)

	// Get events streamed through passedChannel that fit the request.
	WatchEvents(request *events.Request) (*events.EventChannel, error)
}

Interface is an abstract interface for testability. It abstracts the interface to cAdvisor.

func New

func New(port uint) (Interface, error)

Creates a cAdvisor and exports its API on the specified port if port > 0.

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) ContainerInfo

func (c *Mock) ContainerInfo(name string, req *cadvisorApi.ContainerInfoRequest) (*cadvisorApi.ContainerInfo, error)

ContainerInfo is a mock implementation of Interface.ContainerInfo.

func (*Mock) DockerContainer

func (c *Mock) DockerContainer(name string, req *cadvisorApi.ContainerInfoRequest) (cadvisorApi.ContainerInfo, error)

DockerContainer is a mock implementation of Interface.DockerContainer.

func (*Mock) DockerImagesFsInfo

func (c *Mock) DockerImagesFsInfo() (cadvisorApiV2.FsInfo, error)

func (*Mock) MachineInfo

func (c *Mock) MachineInfo() (*cadvisorApi.MachineInfo, error)

MachineInfo is a mock implementation of Interface.MachineInfo.

func (*Mock) RootFsInfo

func (c *Mock) RootFsInfo() (cadvisorApiV2.FsInfo, error)

func (*Mock) Start

func (c *Mock) Start() error

func (*Mock) SubcontainerInfo

func (c *Mock) SubcontainerInfo(name string, req *cadvisorApi.ContainerInfoRequest) (map[string]*cadvisorApi.ContainerInfo, error)

func (*Mock) VersionInfo

func (c *Mock) VersionInfo() (*cadvisorApi.VersionInfo, error)

func (*Mock) WatchEvents

func (c *Mock) WatchEvents(request *events.Request) (*events.EventChannel, error)

Jump to

Keyboard shortcuts

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