Documentation ¶
Index ¶
- Constants
- type Fake
- func (c *Fake) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
- func (c *Fake) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
- func (c *Fake) DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error)
- func (c *Fake) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)
- func (c *Fake) ImagesFsInfo() (cadvisorapiv2.FsInfo, error)
- func (c *Fake) MachineInfo() (*cadvisorapi.MachineInfo, error)
- func (c *Fake) RootFsInfo() (cadvisorapiv2.FsInfo, error)
- func (c *Fake) Start() error
- func (c *Fake) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
- func (c *Fake) VersionInfo() (*cadvisorapi.VersionInfo, error)
- func (c *Fake) WatchEvents(request *events.Request) (*events.EventChannel, error)
- type Mock
- func (c *Mock) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
- func (c *Mock) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
- func (c *Mock) DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error)
- func (c *Mock) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)
- func (c *Mock) ImagesFsInfo() (cadvisorapiv2.FsInfo, error)
- func (c *Mock) MachineInfo() (*cadvisorapi.MachineInfo, error)
- func (c *Mock) RootFsInfo() (cadvisorapiv2.FsInfo, error)
- func (c *Mock) Start() error
- func (c *Mock) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
- func (c *Mock) VersionInfo() (*cadvisorapi.VersionInfo, error)
- func (c *Mock) WatchEvents(request *events.Request) (*events.EventChannel, error)
Constants ¶
const ( // FakeKernelVersion is a fake kernel version for testing. FakeKernelVersion = "3.16.0-0.bpo.4-amd64" // FakeContainerOSVersion is a fake OS version for testing. FakeContainerOSVersion = "Debian GNU/Linux 7 (wheezy)" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fake ¶
type Fake struct {
NodeName string
}
Fake cadvisor.Interface implementation.
func (*Fake) ContainerInfo ¶
func (c *Fake) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
ContainerInfo is a fake implementation of Interface.ContainerInfo.
func (*Fake) ContainerInfoV2 ¶
func (c *Fake) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
ContainerInfoV2 is a fake implementation of Interface.ContainerInfoV2.
func (*Fake) DockerContainer ¶
func (c *Fake) DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error)
DockerContainer is a fake implementation of Interface.DockerContainer.
func (*Fake) GetDirFsInfo ¶ added in v1.10.0
func (c *Fake) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)
GetDirFsInfo is a fake implementation of Interface.GetDirFsInfo.
func (*Fake) ImagesFsInfo ¶ added in v1.3.0
func (c *Fake) ImagesFsInfo() (cadvisorapiv2.FsInfo, error)
ImagesFsInfo is a fake implementation of Interface.ImagesFsInfo.
func (*Fake) MachineInfo ¶
func (c *Fake) MachineInfo() (*cadvisorapi.MachineInfo, error)
MachineInfo is a fake implementation of Interface.MachineInfo.
func (*Fake) RootFsInfo ¶
func (c *Fake) RootFsInfo() (cadvisorapiv2.FsInfo, error)
RootFsInfo is a fake implementation of Interface.RootFsInfo.
func (*Fake) SubcontainerInfo ¶
func (c *Fake) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
SubcontainerInfo is a fake implementation of Interface.SubcontainerInfo.
func (*Fake) VersionInfo ¶
func (c *Fake) VersionInfo() (*cadvisorapi.VersionInfo, error)
VersionInfo is a fake implementation of Interface.VersionInfo.
func (*Fake) WatchEvents ¶
WatchEvents is a fake implementation of Interface.WatchEvents.
type Mock ¶
Mock cadvisor.Interface implementation.
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)
GetDirFsInfo is a mock implementation of Interface.GetDirFsInfo.
func (*Mock) ImagesFsInfo ¶ added in v1.3.0
func (c *Mock) ImagesFsInfo() (cadvisorapiv2.FsInfo, error)
ImagesFsInfo is a mock implementation of Interface.ImagesFsInfo.
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)
RootFsInfo is a mock implementation of Interface.RootFsInfo.
func (*Mock) SubcontainerInfo ¶
func (c *Mock) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
SubcontainerInfo is a mock implementation of Interface.SubcontainerInfo.
func (*Mock) VersionInfo ¶
func (c *Mock) VersionInfo() (*cadvisorapi.VersionInfo, error)
VersionInfo is a mock implementation of Interface.VersionInfo.
func (*Mock) WatchEvents ¶
WatchEvents is a mock implementation of Interface.WatchEvents.