cadvisor

package
v0.13.1-dev Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2015 License: Apache-2.0 Imports: 11 Imported by: 545

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 added in v0.13.1

type Fake struct {
}

Fake cAdvisor implementation.

func (*Fake) ContainerInfo added in v0.13.1

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

func (*Fake) DockerContainer added in v0.13.1

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

func (*Fake) MachineInfo added in v0.13.1

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

type Interface

type Interface interface {
	DockerContainer(name string, req *cadvisorApi.ContainerInfoRequest) (cadvisorApi.ContainerInfo, error)
	ContainerInfo(name string, req *cadvisorApi.ContainerInfoRequest) (*cadvisorApi.ContainerInfo, error)
	MachineInfo() (*cadvisorApi.MachineInfo, 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) MachineInfo

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

MachineInfo is a mock implementation of Interface.MachineInfo.

Jump to

Keyboard shortcuts

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