kubernetes: github.com/erimatnor/kubernetes/pkg/kubelet/cadvisor Index | Files

package cadvisor

import "github.com/erimatnor/kubernetes/pkg/kubelet/cadvisor"

Kubelet interactions with cAdvisor.

Index

Package Files

cadvisor_fake.go cadvisor_linux.go cadvisor_mock.go doc.go types.go

type Fake Uses

type Fake struct {
}

Fake cAdvisor implementation.

func (*Fake) ContainerInfo Uses

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

func (*Fake) DockerContainer Uses

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

func (*Fake) DockerImagesFsInfo Uses

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

func (*Fake) MachineInfo Uses

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

func (*Fake) SubcontainerInfo Uses

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

func (*Fake) VersionInfo Uses

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

func (*Fake) WatchEvents Uses

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

type Interface Uses

type Interface interface {
    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)

    // 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 Uses

func New(port uint) (Interface, error)

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

type Mock Uses

type Mock struct {
    mock.Mock
}

func (*Mock) ContainerInfo Uses

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

ContainerInfo is a mock implementation of Interface.ContainerInfo.

func (*Mock) DockerContainer Uses

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

DockerContainer is a mock implementation of Interface.DockerContainer.

func (*Mock) DockerImagesFsInfo Uses

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

func (*Mock) MachineInfo Uses

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

MachineInfo is a mock implementation of Interface.MachineInfo.

func (*Mock) SubcontainerInfo Uses

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

func (*Mock) VersionInfo Uses

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

func (*Mock) WatchEvents Uses

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

Package cadvisor imports 14 packages (graph). Updated 2017-05-11. Refresh now. Tools for package owners.