testing

package
v1.13.8 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Fake

type Fake struct {
	NodeName string
}

Fake cAdvisor implementation.

func (*Fake) ContainerInfo

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

func (*Fake) ContainerInfoV2

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

func (*Fake) DockerContainer

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

func (*Fake) GetDirFsInfo added in v1.10.0

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

func (*Fake) ImagesFsInfo added in v1.3.0

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

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

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

DockerContainer is a mock implementation of Interface.DockerContainer.

func (*Mock) GetDirFsInfo added in v1.10.0

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

func (*Mock) ImagesFsInfo added in v1.3.0

func (c *Mock) ImagesFsInfo() (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