Documentation ¶
Index ¶
- Constants
- type Fake
- func (c *Fake) ContainerFsInfo(context.Context) (cadvisorapiv2.FsInfo, error)
- func (c *Fake) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
- func (c *Fake) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)
- func (c *Fake) GetRequestedContainersInfo(containerName string, options cadvisorapiv2.RequestOptions) (map[string]*cadvisorapi.ContainerInfo, error)
- func (c *Fake) ImagesFsInfo(context.Context) (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) VersionInfo() (*cadvisorapi.VersionInfo, error)
- type MockInterface
- func (_m *MockInterface) ContainerFsInfo(_a0 context.Context) (v2.FsInfo, error)
- func (_m *MockInterface) ContainerInfoV2(name string, options v2.RequestOptions) (map[string]v2.ContainerInfo, error)
- func (_m *MockInterface) EXPECT() *MockInterface_Expecter
- func (_m *MockInterface) GetDirFsInfo(path string) (v2.FsInfo, error)
- func (_m *MockInterface) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*v1.ContainerInfo, error)
- func (_m *MockInterface) ImagesFsInfo(_a0 context.Context) (v2.FsInfo, error)
- func (_m *MockInterface) MachineInfo() (*v1.MachineInfo, error)
- func (_m *MockInterface) RootFsInfo() (v2.FsInfo, error)
- func (_m *MockInterface) Start() error
- func (_m *MockInterface) VersionInfo() (*v1.VersionInfo, error)
- type MockInterface_ContainerFsInfo_Call
- func (_c *MockInterface_ContainerFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_ContainerFsInfo_Call
- func (_c *MockInterface_ContainerFsInfo_Call) Run(run func(_a0 context.Context)) *MockInterface_ContainerFsInfo_Call
- func (_c *MockInterface_ContainerFsInfo_Call) RunAndReturn(run func(context.Context) (v2.FsInfo, error)) *MockInterface_ContainerFsInfo_Call
- type MockInterface_ContainerInfoV2_Call
- func (_c *MockInterface_ContainerInfoV2_Call) Return(_a0 map[string]v2.ContainerInfo, _a1 error) *MockInterface_ContainerInfoV2_Call
- func (_c *MockInterface_ContainerInfoV2_Call) Run(run func(name string, options v2.RequestOptions)) *MockInterface_ContainerInfoV2_Call
- func (_c *MockInterface_ContainerInfoV2_Call) RunAndReturn(run func(string, v2.RequestOptions) (map[string]v2.ContainerInfo, error)) *MockInterface_ContainerInfoV2_Call
- type MockInterface_Expecter
- func (_e *MockInterface_Expecter) ContainerFsInfo(_a0 interface{}) *MockInterface_ContainerFsInfo_Call
- func (_e *MockInterface_Expecter) ContainerInfoV2(name interface{}, options interface{}) *MockInterface_ContainerInfoV2_Call
- func (_e *MockInterface_Expecter) GetDirFsInfo(path interface{}) *MockInterface_GetDirFsInfo_Call
- func (_e *MockInterface_Expecter) GetRequestedContainersInfo(containerName interface{}, options interface{}) *MockInterface_GetRequestedContainersInfo_Call
- func (_e *MockInterface_Expecter) ImagesFsInfo(_a0 interface{}) *MockInterface_ImagesFsInfo_Call
- func (_e *MockInterface_Expecter) MachineInfo() *MockInterface_MachineInfo_Call
- func (_e *MockInterface_Expecter) RootFsInfo() *MockInterface_RootFsInfo_Call
- func (_e *MockInterface_Expecter) Start() *MockInterface_Start_Call
- func (_e *MockInterface_Expecter) VersionInfo() *MockInterface_VersionInfo_Call
- type MockInterface_GetDirFsInfo_Call
- func (_c *MockInterface_GetDirFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_GetDirFsInfo_Call
- func (_c *MockInterface_GetDirFsInfo_Call) Run(run func(path string)) *MockInterface_GetDirFsInfo_Call
- func (_c *MockInterface_GetDirFsInfo_Call) RunAndReturn(run func(string) (v2.FsInfo, error)) *MockInterface_GetDirFsInfo_Call
- type MockInterface_GetRequestedContainersInfo_Call
- func (_c *MockInterface_GetRequestedContainersInfo_Call) Return(_a0 map[string]*v1.ContainerInfo, _a1 error) *MockInterface_GetRequestedContainersInfo_Call
- func (_c *MockInterface_GetRequestedContainersInfo_Call) Run(run func(containerName string, options v2.RequestOptions)) *MockInterface_GetRequestedContainersInfo_Call
- func (_c *MockInterface_GetRequestedContainersInfo_Call) RunAndReturn(run func(string, v2.RequestOptions) (map[string]*v1.ContainerInfo, error)) *MockInterface_GetRequestedContainersInfo_Call
- type MockInterface_ImagesFsInfo_Call
- func (_c *MockInterface_ImagesFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_ImagesFsInfo_Call
- func (_c *MockInterface_ImagesFsInfo_Call) Run(run func(_a0 context.Context)) *MockInterface_ImagesFsInfo_Call
- func (_c *MockInterface_ImagesFsInfo_Call) RunAndReturn(run func(context.Context) (v2.FsInfo, error)) *MockInterface_ImagesFsInfo_Call
- type MockInterface_MachineInfo_Call
- func (_c *MockInterface_MachineInfo_Call) Return(_a0 *v1.MachineInfo, _a1 error) *MockInterface_MachineInfo_Call
- func (_c *MockInterface_MachineInfo_Call) Run(run func()) *MockInterface_MachineInfo_Call
- func (_c *MockInterface_MachineInfo_Call) RunAndReturn(run func() (*v1.MachineInfo, error)) *MockInterface_MachineInfo_Call
- type MockInterface_RootFsInfo_Call
- func (_c *MockInterface_RootFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_RootFsInfo_Call
- func (_c *MockInterface_RootFsInfo_Call) Run(run func()) *MockInterface_RootFsInfo_Call
- func (_c *MockInterface_RootFsInfo_Call) RunAndReturn(run func() (v2.FsInfo, error)) *MockInterface_RootFsInfo_Call
- type MockInterface_Start_Call
- type MockInterface_VersionInfo_Call
- func (_c *MockInterface_VersionInfo_Call) Return(_a0 *v1.VersionInfo, _a1 error) *MockInterface_VersionInfo_Call
- func (_c *MockInterface_VersionInfo_Call) Run(run func()) *MockInterface_VersionInfo_Call
- func (_c *MockInterface_VersionInfo_Call) RunAndReturn(run func() (*v1.VersionInfo, error)) *MockInterface_VersionInfo_Call
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) ContainerFsInfo ¶ added in v1.29.0
ContainerFsInfo is a fake implementation of Interface.ContainerFsInfo.
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) 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) GetRequestedContainersInfo ¶ added in v1.19.0
func (c *Fake) GetRequestedContainersInfo(containerName string, options cadvisorapiv2.RequestOptions) (map[string]*cadvisorapi.ContainerInfo, error)
GetRequestedContainersInfo is a fake implementation if Interface.GetRequestedContainersInfo
func (*Fake) ImagesFsInfo ¶ added in v1.3.0
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) VersionInfo ¶
func (c *Fake) VersionInfo() (*cadvisorapi.VersionInfo, error)
VersionInfo is a fake implementation of Interface.VersionInfo.
type MockInterface ¶ added in v1.23.0
MockInterface is an autogenerated mock type for the Interface type
func NewMockInterface ¶ added in v1.23.0
func NewMockInterface(t interface { mock.TestingT Cleanup(func()) }) *MockInterface
NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockInterface) ContainerFsInfo ¶ added in v1.29.0
ContainerFsInfo provides a mock function with given fields: _a0
func (*MockInterface) ContainerInfoV2 ¶ added in v1.23.0
func (_m *MockInterface) ContainerInfoV2(name string, options v2.RequestOptions) (map[string]v2.ContainerInfo, error)
ContainerInfoV2 provides a mock function with given fields: name, options
func (*MockInterface) EXPECT ¶ added in v1.23.0
func (_m *MockInterface) EXPECT() *MockInterface_Expecter
func (*MockInterface) GetDirFsInfo ¶ added in v1.23.0
func (_m *MockInterface) GetDirFsInfo(path string) (v2.FsInfo, error)
GetDirFsInfo provides a mock function with given fields: path
func (*MockInterface) GetRequestedContainersInfo ¶ added in v1.23.0
func (_m *MockInterface) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*v1.ContainerInfo, error)
GetRequestedContainersInfo provides a mock function with given fields: containerName, options
func (*MockInterface) ImagesFsInfo ¶ added in v1.23.0
ImagesFsInfo provides a mock function with given fields: _a0
func (*MockInterface) MachineInfo ¶ added in v1.23.0
func (_m *MockInterface) MachineInfo() (*v1.MachineInfo, error)
MachineInfo provides a mock function with given fields:
func (*MockInterface) RootFsInfo ¶ added in v1.23.0
func (_m *MockInterface) RootFsInfo() (v2.FsInfo, error)
RootFsInfo provides a mock function with given fields:
func (*MockInterface) Start ¶ added in v1.23.0
func (_m *MockInterface) Start() error
Start provides a mock function with given fields:
func (*MockInterface) VersionInfo ¶ added in v1.23.0
func (_m *MockInterface) VersionInfo() (*v1.VersionInfo, error)
VersionInfo provides a mock function with given fields:
type MockInterface_ContainerFsInfo_Call ¶ added in v1.31.0
MockInterface_ContainerFsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainerFsInfo'
func (*MockInterface_ContainerFsInfo_Call) Return ¶ added in v1.31.0
func (_c *MockInterface_ContainerFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_ContainerFsInfo_Call
func (*MockInterface_ContainerFsInfo_Call) Run ¶ added in v1.31.0
func (_c *MockInterface_ContainerFsInfo_Call) Run(run func(_a0 context.Context)) *MockInterface_ContainerFsInfo_Call
func (*MockInterface_ContainerFsInfo_Call) RunAndReturn ¶ added in v1.31.0
func (_c *MockInterface_ContainerFsInfo_Call) RunAndReturn(run func(context.Context) (v2.FsInfo, error)) *MockInterface_ContainerFsInfo_Call
type MockInterface_ContainerInfoV2_Call ¶ added in v1.31.0
MockInterface_ContainerInfoV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainerInfoV2'
func (*MockInterface_ContainerInfoV2_Call) Return ¶ added in v1.31.0
func (_c *MockInterface_ContainerInfoV2_Call) Return(_a0 map[string]v2.ContainerInfo, _a1 error) *MockInterface_ContainerInfoV2_Call
func (*MockInterface_ContainerInfoV2_Call) Run ¶ added in v1.31.0
func (_c *MockInterface_ContainerInfoV2_Call) Run(run func(name string, options v2.RequestOptions)) *MockInterface_ContainerInfoV2_Call
func (*MockInterface_ContainerInfoV2_Call) RunAndReturn ¶ added in v1.31.0
func (_c *MockInterface_ContainerInfoV2_Call) RunAndReturn(run func(string, v2.RequestOptions) (map[string]v2.ContainerInfo, error)) *MockInterface_ContainerInfoV2_Call
type MockInterface_Expecter ¶ added in v1.31.0
type MockInterface_Expecter struct {
// contains filtered or unexported fields
}
func (*MockInterface_Expecter) ContainerFsInfo ¶ added in v1.31.0
func (_e *MockInterface_Expecter) ContainerFsInfo(_a0 interface{}) *MockInterface_ContainerFsInfo_Call
ContainerFsInfo is a helper method to define mock.On call
- _a0 context.Context
func (*MockInterface_Expecter) ContainerInfoV2 ¶ added in v1.31.0
func (_e *MockInterface_Expecter) ContainerInfoV2(name interface{}, options interface{}) *MockInterface_ContainerInfoV2_Call
ContainerInfoV2 is a helper method to define mock.On call
- name string
- options v2.RequestOptions
func (*MockInterface_Expecter) GetDirFsInfo ¶ added in v1.31.0
func (_e *MockInterface_Expecter) GetDirFsInfo(path interface{}) *MockInterface_GetDirFsInfo_Call
GetDirFsInfo is a helper method to define mock.On call
- path string
func (*MockInterface_Expecter) GetRequestedContainersInfo ¶ added in v1.31.0
func (_e *MockInterface_Expecter) GetRequestedContainersInfo(containerName interface{}, options interface{}) *MockInterface_GetRequestedContainersInfo_Call
GetRequestedContainersInfo is a helper method to define mock.On call
- containerName string
- options v2.RequestOptions
func (*MockInterface_Expecter) ImagesFsInfo ¶ added in v1.31.0
func (_e *MockInterface_Expecter) ImagesFsInfo(_a0 interface{}) *MockInterface_ImagesFsInfo_Call
ImagesFsInfo is a helper method to define mock.On call
- _a0 context.Context
func (*MockInterface_Expecter) MachineInfo ¶ added in v1.31.0
func (_e *MockInterface_Expecter) MachineInfo() *MockInterface_MachineInfo_Call
MachineInfo is a helper method to define mock.On call
func (*MockInterface_Expecter) RootFsInfo ¶ added in v1.31.0
func (_e *MockInterface_Expecter) RootFsInfo() *MockInterface_RootFsInfo_Call
RootFsInfo is a helper method to define mock.On call
func (*MockInterface_Expecter) Start ¶ added in v1.31.0
func (_e *MockInterface_Expecter) Start() *MockInterface_Start_Call
Start is a helper method to define mock.On call
func (*MockInterface_Expecter) VersionInfo ¶ added in v1.31.0
func (_e *MockInterface_Expecter) VersionInfo() *MockInterface_VersionInfo_Call
VersionInfo is a helper method to define mock.On call
type MockInterface_GetDirFsInfo_Call ¶ added in v1.31.0
MockInterface_GetDirFsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDirFsInfo'
func (*MockInterface_GetDirFsInfo_Call) Return ¶ added in v1.31.0
func (_c *MockInterface_GetDirFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_GetDirFsInfo_Call
func (*MockInterface_GetDirFsInfo_Call) Run ¶ added in v1.31.0
func (_c *MockInterface_GetDirFsInfo_Call) Run(run func(path string)) *MockInterface_GetDirFsInfo_Call
func (*MockInterface_GetDirFsInfo_Call) RunAndReturn ¶ added in v1.31.0
func (_c *MockInterface_GetDirFsInfo_Call) RunAndReturn(run func(string) (v2.FsInfo, error)) *MockInterface_GetDirFsInfo_Call
type MockInterface_GetRequestedContainersInfo_Call ¶ added in v1.31.0
MockInterface_GetRequestedContainersInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRequestedContainersInfo'
func (*MockInterface_GetRequestedContainersInfo_Call) Return ¶ added in v1.31.0
func (_c *MockInterface_GetRequestedContainersInfo_Call) Return(_a0 map[string]*v1.ContainerInfo, _a1 error) *MockInterface_GetRequestedContainersInfo_Call
func (*MockInterface_GetRequestedContainersInfo_Call) Run ¶ added in v1.31.0
func (_c *MockInterface_GetRequestedContainersInfo_Call) Run(run func(containerName string, options v2.RequestOptions)) *MockInterface_GetRequestedContainersInfo_Call
func (*MockInterface_GetRequestedContainersInfo_Call) RunAndReturn ¶ added in v1.31.0
func (_c *MockInterface_GetRequestedContainersInfo_Call) RunAndReturn(run func(string, v2.RequestOptions) (map[string]*v1.ContainerInfo, error)) *MockInterface_GetRequestedContainersInfo_Call
type MockInterface_ImagesFsInfo_Call ¶ added in v1.31.0
MockInterface_ImagesFsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImagesFsInfo'
func (*MockInterface_ImagesFsInfo_Call) Return ¶ added in v1.31.0
func (_c *MockInterface_ImagesFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_ImagesFsInfo_Call
func (*MockInterface_ImagesFsInfo_Call) Run ¶ added in v1.31.0
func (_c *MockInterface_ImagesFsInfo_Call) Run(run func(_a0 context.Context)) *MockInterface_ImagesFsInfo_Call
func (*MockInterface_ImagesFsInfo_Call) RunAndReturn ¶ added in v1.31.0
func (_c *MockInterface_ImagesFsInfo_Call) RunAndReturn(run func(context.Context) (v2.FsInfo, error)) *MockInterface_ImagesFsInfo_Call
type MockInterface_MachineInfo_Call ¶ added in v1.31.0
MockInterface_MachineInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MachineInfo'
func (*MockInterface_MachineInfo_Call) Return ¶ added in v1.31.0
func (_c *MockInterface_MachineInfo_Call) Return(_a0 *v1.MachineInfo, _a1 error) *MockInterface_MachineInfo_Call
func (*MockInterface_MachineInfo_Call) Run ¶ added in v1.31.0
func (_c *MockInterface_MachineInfo_Call) Run(run func()) *MockInterface_MachineInfo_Call
func (*MockInterface_MachineInfo_Call) RunAndReturn ¶ added in v1.31.0
func (_c *MockInterface_MachineInfo_Call) RunAndReturn(run func() (*v1.MachineInfo, error)) *MockInterface_MachineInfo_Call
type MockInterface_RootFsInfo_Call ¶ added in v1.31.0
MockInterface_RootFsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RootFsInfo'
func (*MockInterface_RootFsInfo_Call) Return ¶ added in v1.31.0
func (_c *MockInterface_RootFsInfo_Call) Return(_a0 v2.FsInfo, _a1 error) *MockInterface_RootFsInfo_Call
func (*MockInterface_RootFsInfo_Call) Run ¶ added in v1.31.0
func (_c *MockInterface_RootFsInfo_Call) Run(run func()) *MockInterface_RootFsInfo_Call
func (*MockInterface_RootFsInfo_Call) RunAndReturn ¶ added in v1.31.0
func (_c *MockInterface_RootFsInfo_Call) RunAndReturn(run func() (v2.FsInfo, error)) *MockInterface_RootFsInfo_Call
type MockInterface_Start_Call ¶ added in v1.31.0
MockInterface_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
func (*MockInterface_Start_Call) Return ¶ added in v1.31.0
func (_c *MockInterface_Start_Call) Return(_a0 error) *MockInterface_Start_Call
func (*MockInterface_Start_Call) Run ¶ added in v1.31.0
func (_c *MockInterface_Start_Call) Run(run func()) *MockInterface_Start_Call
func (*MockInterface_Start_Call) RunAndReturn ¶ added in v1.31.0
func (_c *MockInterface_Start_Call) RunAndReturn(run func() error) *MockInterface_Start_Call
type MockInterface_VersionInfo_Call ¶ added in v1.31.0
MockInterface_VersionInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VersionInfo'
func (*MockInterface_VersionInfo_Call) Return ¶ added in v1.31.0
func (_c *MockInterface_VersionInfo_Call) Return(_a0 *v1.VersionInfo, _a1 error) *MockInterface_VersionInfo_Call
func (*MockInterface_VersionInfo_Call) Run ¶ added in v1.31.0
func (_c *MockInterface_VersionInfo_Call) Run(run func()) *MockInterface_VersionInfo_Call
func (*MockInterface_VersionInfo_Call) RunAndReturn ¶ added in v1.31.0
func (_c *MockInterface_VersionInfo_Call) RunAndReturn(run func() (*v1.VersionInfo, error)) *MockInterface_VersionInfo_Call