kubernetes: k8s.io/kubernetes/pkg/kubelet/cadvisor/testing Index | Files

package testing

import "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing"

Index

Package Files

cadvisor_fake.go cadvisor_mock.go

Constants

const (
    FakeNumCores           = 1
    FakeMemoryCapacity     = 4026531840
    FakeKernelVersion      = "3.16.0-0.bpo.4-amd64"
    FakeContainerOsVersion = "Debian GNU/Linux 7 (wheezy)"
    FakeDockerVersion      = "1.13.1"
)

type Fake Uses

type Fake struct {
    NodeName string
}

Fake cAdvisor implementation.

func (*Fake) ContainerInfo Uses

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

func (*Fake) ContainerInfoV2 Uses

func (c *Fake) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)

func (*Fake) DockerContainer Uses

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

func (*Fake) GetDirFsInfo Uses

func (c *Fake) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)

func (*Fake) ImagesFsInfo Uses

func (c *Fake) ImagesFsInfo() (cadvisorapiv2.FsInfo, error)

func (*Fake) MachineInfo Uses

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

func (*Fake) RootFsInfo Uses

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

func (*Fake) Start Uses

func (c *Fake) Start() 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 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) ContainerInfoV2 Uses

func (c *Mock) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)

ContainerInfoV2 is a mock implementation of Interface.ContainerInfoV2.

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) GetDirFsInfo Uses

func (c *Mock) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)

func (*Mock) ImagesFsInfo Uses

func (c *Mock) ImagesFsInfo() (cadvisorapiv2.FsInfo, error)

func (*Mock) MachineInfo Uses

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

MachineInfo is a mock implementation of Interface.MachineInfo.

func (*Mock) RootFsInfo Uses

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

func (*Mock) Start Uses

func (c *Mock) Start() error

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 testing imports 5 packages (graph) and is imported by 26 packages. Updated 2019-01-24. Refresh now. Tools for package owners.