kubernetes/pkg/kubelet/server/stats/testing/mock_stats_provider.go

type MockProvider

type MockProvider_Expecter

func (_m *MockProvider) EXPECT() *MockProvider_Expecter {}

// GetCgroupCPUAndMemoryStats provides a mock function with given fields: cgroupName, updateStats
func (_m *MockProvider) GetCgroupCPUAndMemoryStats(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, error) {}

type MockProvider_GetCgroupCPUAndMemoryStats_Call

// GetCgroupCPUAndMemoryStats is a helper method to define mock.On call
//   - cgroupName string
//   - updateStats bool
func (_e *MockProvider_Expecter) GetCgroupCPUAndMemoryStats(cgroupName interface{}

func (_c *MockProvider_GetCgroupCPUAndMemoryStats_Call) Run(run func(cgroupName string, updateStats bool)) *MockProvider_GetCgroupCPUAndMemoryStats_Call {}

func (_c *MockProvider_GetCgroupCPUAndMemoryStats_Call) Return(_a0 *v1alpha1.ContainerStats, _a1 error) *MockProvider_GetCgroupCPUAndMemoryStats_Call {}

func (_c *MockProvider_GetCgroupCPUAndMemoryStats_Call) RunAndReturn(run func(string, bool) (*v1alpha1.ContainerStats, error)) *MockProvider_GetCgroupCPUAndMemoryStats_Call {}

// GetCgroupStats provides a mock function with given fields: cgroupName, updateStats
func (_m *MockProvider) GetCgroupStats(cgroupName string, updateStats bool) (*v1alpha1.ContainerStats, *v1alpha1.NetworkStats, error) {}

type MockProvider_GetCgroupStats_Call

// GetCgroupStats is a helper method to define mock.On call
//   - cgroupName string
//   - updateStats bool
func (_e *MockProvider_Expecter) GetCgroupStats(cgroupName interface{}

func (_c *MockProvider_GetCgroupStats_Call) Run(run func(cgroupName string, updateStats bool)) *MockProvider_GetCgroupStats_Call {}

func (_c *MockProvider_GetCgroupStats_Call) Return(_a0 *v1alpha1.ContainerStats, _a1 *v1alpha1.NetworkStats, _a2 error) *MockProvider_GetCgroupStats_Call {}

func (_c *MockProvider_GetCgroupStats_Call) RunAndReturn(run func(string, bool) (*v1alpha1.ContainerStats, *v1alpha1.NetworkStats, error)) *MockProvider_GetCgroupStats_Call {}

// GetNode provides a mock function with given fields:
func (_m *MockProvider) GetNode() (*v1.Node, error) {}

type MockProvider_GetNode_Call

// GetNode is a helper method to define mock.On call
func (_e *MockProvider_Expecter) GetNode() *MockProvider_GetNode_Call {}

func (_c *MockProvider_GetNode_Call) Run(run func()) *MockProvider_GetNode_Call {}

func (_c *MockProvider_GetNode_Call) Return(_a0 *v1.Node, _a1 error) *MockProvider_GetNode_Call {}

func (_c *MockProvider_GetNode_Call) RunAndReturn(run func() (*v1.Node, error)) *MockProvider_GetNode_Call {}

// GetNodeConfig provides a mock function with given fields:
func (_m *MockProvider) GetNodeConfig() cm.NodeConfig {}

type MockProvider_GetNodeConfig_Call

// GetNodeConfig is a helper method to define mock.On call
func (_e *MockProvider_Expecter) GetNodeConfig() *MockProvider_GetNodeConfig_Call {}

func (_c *MockProvider_GetNodeConfig_Call) Run(run func()) *MockProvider_GetNodeConfig_Call {}

func (_c *MockProvider_GetNodeConfig_Call) Return(_a0 cm.NodeConfig) *MockProvider_GetNodeConfig_Call {}

func (_c *MockProvider_GetNodeConfig_Call) RunAndReturn(run func() cm.NodeConfig) *MockProvider_GetNodeConfig_Call {}

// GetPodByCgroupfs provides a mock function with given fields: cgroupfs
func (_m *MockProvider) GetPodByCgroupfs(cgroupfs string) (*v1.Pod, bool) {}

type MockProvider_GetPodByCgroupfs_Call

// GetPodByCgroupfs is a helper method to define mock.On call
//   - cgroupfs string
func (_e *MockProvider_Expecter) GetPodByCgroupfs(cgroupfs interface{}

func (_c *MockProvider_GetPodByCgroupfs_Call) Run(run func(cgroupfs string)) *MockProvider_GetPodByCgroupfs_Call {}

func (_c *MockProvider_GetPodByCgroupfs_Call) Return(_a0 *v1.Pod, _a1 bool) *MockProvider_GetPodByCgroupfs_Call {}

func (_c *MockProvider_GetPodByCgroupfs_Call) RunAndReturn(run func(string) (*v1.Pod, bool)) *MockProvider_GetPodByCgroupfs_Call {}

// GetPodByName provides a mock function with given fields: namespace, name
func (_m *MockProvider) GetPodByName(namespace string, name string) (*v1.Pod, bool) {}

type MockProvider_GetPodByName_Call

// GetPodByName is a helper method to define mock.On call
//   - namespace string
//   - name string
func (_e *MockProvider_Expecter) GetPodByName(namespace interface{}

func (_c *MockProvider_GetPodByName_Call) Run(run func(namespace string, name string)) *MockProvider_GetPodByName_Call {}

func (_c *MockProvider_GetPodByName_Call) Return(_a0 *v1.Pod, _a1 bool) *MockProvider_GetPodByName_Call {}

func (_c *MockProvider_GetPodByName_Call) RunAndReturn(run func(string, string) (*v1.Pod, bool)) *MockProvider_GetPodByName_Call {}

// GetPodCgroupRoot provides a mock function with given fields:
func (_m *MockProvider) GetPodCgroupRoot() string {}

type MockProvider_GetPodCgroupRoot_Call

// GetPodCgroupRoot is a helper method to define mock.On call
func (_e *MockProvider_Expecter) GetPodCgroupRoot() *MockProvider_GetPodCgroupRoot_Call {}

func (_c *MockProvider_GetPodCgroupRoot_Call) Run(run func()) *MockProvider_GetPodCgroupRoot_Call {}

func (_c *MockProvider_GetPodCgroupRoot_Call) Return(_a0 string) *MockProvider_GetPodCgroupRoot_Call {}

func (_c *MockProvider_GetPodCgroupRoot_Call) RunAndReturn(run func() string) *MockProvider_GetPodCgroupRoot_Call {}

// GetPods provides a mock function with given fields:
func (_m *MockProvider) GetPods() []*v1.Pod {}

type MockProvider_GetPods_Call

// GetPods is a helper method to define mock.On call
func (_e *MockProvider_Expecter) GetPods() *MockProvider_GetPods_Call {}

func (_c *MockProvider_GetPods_Call) Run(run func()) *MockProvider_GetPods_Call {}

func (_c *MockProvider_GetPods_Call) Return(_a0 []*v1.Pod) *MockProvider_GetPods_Call {}

func (_c *MockProvider_GetPods_Call) RunAndReturn(run func() []*v1.Pod) *MockProvider_GetPods_Call {}

// GetRequestedContainersInfo provides a mock function with given fields: containerName, options
func (_m *MockProvider) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*infov1.ContainerInfo, error) {}

type MockProvider_GetRequestedContainersInfo_Call

// GetRequestedContainersInfo is a helper method to define mock.On call
//   - containerName string
//   - options v2.RequestOptions
func (_e *MockProvider_Expecter) GetRequestedContainersInfo(containerName interface{}

func (_c *MockProvider_GetRequestedContainersInfo_Call) Run(run func(containerName string, options v2.RequestOptions)) *MockProvider_GetRequestedContainersInfo_Call {}

func (_c *MockProvider_GetRequestedContainersInfo_Call) Return(_a0 map[string]*infov1.ContainerInfo, _a1 error) *MockProvider_GetRequestedContainersInfo_Call {}

func (_c *MockProvider_GetRequestedContainersInfo_Call) RunAndReturn(run func(string, v2.RequestOptions) (map[string]*infov1.ContainerInfo, error)) *MockProvider_GetRequestedContainersInfo_Call {}

// ImageFsStats provides a mock function with given fields: ctx
func (_m *MockProvider) ImageFsStats(ctx context.Context) (*v1alpha1.FsStats, *v1alpha1.FsStats, error) {}

type MockProvider_ImageFsStats_Call

// ImageFsStats is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockProvider_Expecter) ImageFsStats(ctx interface{}

func (_c *MockProvider_ImageFsStats_Call) Run(run func(ctx context.Context)) *MockProvider_ImageFsStats_Call {}

func (_c *MockProvider_ImageFsStats_Call) Return(imageFs *v1alpha1.FsStats, containerFs *v1alpha1.FsStats, callErr error) *MockProvider_ImageFsStats_Call {}

func (_c *MockProvider_ImageFsStats_Call) RunAndReturn(run func(context.Context) (*v1alpha1.FsStats, *v1alpha1.FsStats, error)) *MockProvider_ImageFsStats_Call {}

// ListBlockVolumesForPod provides a mock function with given fields: podUID
func (_m *MockProvider) ListBlockVolumesForPod(podUID types.UID) (map[string]volume.BlockVolume, bool) {}

type MockProvider_ListBlockVolumesForPod_Call

// ListBlockVolumesForPod is a helper method to define mock.On call
//   - podUID types.UID
func (_e *MockProvider_Expecter) ListBlockVolumesForPod(podUID interface{}

func (_c *MockProvider_ListBlockVolumesForPod_Call) Run(run func(podUID types.UID)) *MockProvider_ListBlockVolumesForPod_Call {}

func (_c *MockProvider_ListBlockVolumesForPod_Call) Return(_a0 map[string]volume.BlockVolume, _a1 bool) *MockProvider_ListBlockVolumesForPod_Call {}

func (_c *MockProvider_ListBlockVolumesForPod_Call) RunAndReturn(run func(types.UID) (map[string]volume.BlockVolume, bool)) *MockProvider_ListBlockVolumesForPod_Call {}

// ListPodCPUAndMemoryStats provides a mock function with given fields: ctx
func (_m *MockProvider) ListPodCPUAndMemoryStats(ctx context.Context) ([]v1alpha1.PodStats, error) {}

type MockProvider_ListPodCPUAndMemoryStats_Call

// ListPodCPUAndMemoryStats is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockProvider_Expecter) ListPodCPUAndMemoryStats(ctx interface{}

func (_c *MockProvider_ListPodCPUAndMemoryStats_Call) Run(run func(ctx context.Context)) *MockProvider_ListPodCPUAndMemoryStats_Call {}

func (_c *MockProvider_ListPodCPUAndMemoryStats_Call) Return(_a0 []v1alpha1.PodStats, _a1 error) *MockProvider_ListPodCPUAndMemoryStats_Call {}

func (_c *MockProvider_ListPodCPUAndMemoryStats_Call) RunAndReturn(run func(context.Context) ([]v1alpha1.PodStats, error)) *MockProvider_ListPodCPUAndMemoryStats_Call {}

// ListPodStats provides a mock function with given fields: ctx
func (_m *MockProvider) ListPodStats(ctx context.Context) ([]v1alpha1.PodStats, error) {}

type MockProvider_ListPodStats_Call

// ListPodStats is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockProvider_Expecter) ListPodStats(ctx interface{}

func (_c *MockProvider_ListPodStats_Call) Run(run func(ctx context.Context)) *MockProvider_ListPodStats_Call {}

func (_c *MockProvider_ListPodStats_Call) Return(_a0 []v1alpha1.PodStats, _a1 error) *MockProvider_ListPodStats_Call {}

func (_c *MockProvider_ListPodStats_Call) RunAndReturn(run func(context.Context) ([]v1alpha1.PodStats, error)) *MockProvider_ListPodStats_Call {}

// ListPodStatsAndUpdateCPUNanoCoreUsage provides a mock function with given fields: ctx
func (_m *MockProvider) ListPodStatsAndUpdateCPUNanoCoreUsage(ctx context.Context) ([]v1alpha1.PodStats, error) {}

type MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call

// ListPodStatsAndUpdateCPUNanoCoreUsage is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockProvider_Expecter) ListPodStatsAndUpdateCPUNanoCoreUsage(ctx interface{}

func (_c *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) Run(run func(ctx context.Context)) *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call {}

func (_c *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) Return(_a0 []v1alpha1.PodStats, _a1 error) *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call {}

func (_c *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call) RunAndReturn(run func(context.Context) ([]v1alpha1.PodStats, error)) *MockProvider_ListPodStatsAndUpdateCPUNanoCoreUsage_Call {}

// ListVolumesForPod provides a mock function with given fields: podUID
func (_m *MockProvider) ListVolumesForPod(podUID types.UID) (map[string]volume.Volume, bool) {}

type MockProvider_ListVolumesForPod_Call

// ListVolumesForPod is a helper method to define mock.On call
//   - podUID types.UID
func (_e *MockProvider_Expecter) ListVolumesForPod(podUID interface{}

func (_c *MockProvider_ListVolumesForPod_Call) Run(run func(podUID types.UID)) *MockProvider_ListVolumesForPod_Call {}

func (_c *MockProvider_ListVolumesForPod_Call) Return(_a0 map[string]volume.Volume, _a1 bool) *MockProvider_ListVolumesForPod_Call {}

func (_c *MockProvider_ListVolumesForPod_Call) RunAndReturn(run func(types.UID) (map[string]volume.Volume, bool)) *MockProvider_ListVolumesForPod_Call {}

// RlimitStats provides a mock function with given fields:
func (_m *MockProvider) RlimitStats() (*v1alpha1.RlimitStats, error) {}

type MockProvider_RlimitStats_Call

// RlimitStats is a helper method to define mock.On call
func (_e *MockProvider_Expecter) RlimitStats() *MockProvider_RlimitStats_Call {}

func (_c *MockProvider_RlimitStats_Call) Run(run func()) *MockProvider_RlimitStats_Call {}

func (_c *MockProvider_RlimitStats_Call) Return(_a0 *v1alpha1.RlimitStats, _a1 error) *MockProvider_RlimitStats_Call {}

func (_c *MockProvider_RlimitStats_Call) RunAndReturn(run func() (*v1alpha1.RlimitStats, error)) *MockProvider_RlimitStats_Call {}

// RootFsStats provides a mock function with given fields:
func (_m *MockProvider) RootFsStats() (*v1alpha1.FsStats, error) {}

type MockProvider_RootFsStats_Call

// RootFsStats is a helper method to define mock.On call
func (_e *MockProvider_Expecter) RootFsStats() *MockProvider_RootFsStats_Call {}

func (_c *MockProvider_RootFsStats_Call) Run(run func()) *MockProvider_RootFsStats_Call {}

func (_c *MockProvider_RootFsStats_Call) Return(_a0 *v1alpha1.FsStats, _a1 error) *MockProvider_RootFsStats_Call {}

func (_c *MockProvider_RootFsStats_Call) RunAndReturn(run func() (*v1alpha1.FsStats, error)) *MockProvider_RootFsStats_Call {}

// NewMockProvider creates a new instance of MockProvider. 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 NewMockProvider(t interface {}