mocks

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockCPUInfoProvider

type MockCPUInfoProvider struct {
	mock.Mock
}

MockCPUInfoProvider is an autogenerated mock type for the CPUInfoProvider type

func NewMockCPUInfoProvider

func NewMockCPUInfoProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCPUInfoProvider

NewMockCPUInfoProvider creates a new instance of MockCPUInfoProvider. 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 (*MockCPUInfoProvider) Counts

func (_m *MockCPUInfoProvider) Counts(logical bool) (int, error)

Counts provides a mock function with given fields: logical

func (*MockCPUInfoProvider) EXPECT

func (*MockCPUInfoProvider) Info

func (_m *MockCPUInfoProvider) Info() ([]cpu.InfoStat, error)

Info provides a mock function with no fields

func (*MockCPUInfoProvider) Percent

func (_m *MockCPUInfoProvider) Percent(interval time.Duration, perCPU bool) ([]float64, error)

Percent provides a mock function with given fields: interval, perCPU

func (*MockCPUInfoProvider) Times

func (_m *MockCPUInfoProvider) Times(perCPU bool) ([]cpu.TimesStat, error)

Times provides a mock function with given fields: perCPU

type MockCPUInfoProvider_Counts_Call

type MockCPUInfoProvider_Counts_Call struct {
	*mock.Call
}

MockCPUInfoProvider_Counts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Counts'

func (*MockCPUInfoProvider_Counts_Call) Return

func (*MockCPUInfoProvider_Counts_Call) Run

func (*MockCPUInfoProvider_Counts_Call) RunAndReturn

type MockCPUInfoProvider_Expecter

type MockCPUInfoProvider_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockCPUInfoProvider_Expecter) Counts

func (_e *MockCPUInfoProvider_Expecter) Counts(logical interface{}) *MockCPUInfoProvider_Counts_Call

Counts is a helper method to define mock.On call

  • logical bool

func (*MockCPUInfoProvider_Expecter) Info

Info is a helper method to define mock.On call

func (*MockCPUInfoProvider_Expecter) Percent

func (_e *MockCPUInfoProvider_Expecter) Percent(interval interface{}, perCPU interface{}) *MockCPUInfoProvider_Percent_Call

Percent is a helper method to define mock.On call

  • interval time.Duration
  • perCPU bool

func (*MockCPUInfoProvider_Expecter) Times

func (_e *MockCPUInfoProvider_Expecter) Times(perCPU interface{}) *MockCPUInfoProvider_Times_Call

Times is a helper method to define mock.On call

  • perCPU bool

type MockCPUInfoProvider_Info_Call

type MockCPUInfoProvider_Info_Call struct {
	*mock.Call
}

MockCPUInfoProvider_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info'

func (*MockCPUInfoProvider_Info_Call) Return

func (*MockCPUInfoProvider_Info_Call) Run

func (*MockCPUInfoProvider_Info_Call) RunAndReturn

type MockCPUInfoProvider_Percent_Call

type MockCPUInfoProvider_Percent_Call struct {
	*mock.Call
}

MockCPUInfoProvider_Percent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Percent'

func (*MockCPUInfoProvider_Percent_Call) Return

func (*MockCPUInfoProvider_Percent_Call) Run

func (*MockCPUInfoProvider_Percent_Call) RunAndReturn

type MockCPUInfoProvider_Times_Call

type MockCPUInfoProvider_Times_Call struct {
	*mock.Call
}

MockCPUInfoProvider_Times_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Times'

func (*MockCPUInfoProvider_Times_Call) Return

func (*MockCPUInfoProvider_Times_Call) Run

func (*MockCPUInfoProvider_Times_Call) RunAndReturn

type MockDiskInfoProvider

type MockDiskInfoProvider struct {
	mock.Mock
}

MockDiskInfoProvider is an autogenerated mock type for the DiskInfoProvider type

func NewMockDiskInfoProvider

func NewMockDiskInfoProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDiskInfoProvider

NewMockDiskInfoProvider creates a new instance of MockDiskInfoProvider. 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 (*MockDiskInfoProvider) EXPECT

func (*MockDiskInfoProvider) IOCounters

func (_m *MockDiskInfoProvider) IOCounters() (map[string]disk.IOCountersStat, error)

IOCounters provides a mock function with no fields

func (*MockDiskInfoProvider) Partitions

func (_m *MockDiskInfoProvider) Partitions(all bool) ([]disk.PartitionStat, error)

Partitions provides a mock function with given fields: all

func (*MockDiskInfoProvider) Usage

func (_m *MockDiskInfoProvider) Usage(path string) (*disk.UsageStat, error)

Usage provides a mock function with given fields: path

type MockDiskInfoProvider_Expecter

type MockDiskInfoProvider_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockDiskInfoProvider_Expecter) IOCounters

IOCounters is a helper method to define mock.On call

func (*MockDiskInfoProvider_Expecter) Partitions

Partitions is a helper method to define mock.On call

  • all bool

func (*MockDiskInfoProvider_Expecter) Usage

Usage is a helper method to define mock.On call

  • path string

type MockDiskInfoProvider_IOCounters_Call

type MockDiskInfoProvider_IOCounters_Call struct {
	*mock.Call
}

MockDiskInfoProvider_IOCounters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IOCounters'

func (*MockDiskInfoProvider_IOCounters_Call) Return

func (*MockDiskInfoProvider_IOCounters_Call) Run

func (*MockDiskInfoProvider_IOCounters_Call) RunAndReturn

type MockDiskInfoProvider_Partitions_Call

type MockDiskInfoProvider_Partitions_Call struct {
	*mock.Call
}

MockDiskInfoProvider_Partitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Partitions'

func (*MockDiskInfoProvider_Partitions_Call) Return

func (*MockDiskInfoProvider_Partitions_Call) Run

func (*MockDiskInfoProvider_Partitions_Call) RunAndReturn

type MockDiskInfoProvider_Usage_Call

type MockDiskInfoProvider_Usage_Call struct {
	*mock.Call
}

MockDiskInfoProvider_Usage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Usage'

func (*MockDiskInfoProvider_Usage_Call) Return

func (*MockDiskInfoProvider_Usage_Call) Run

func (*MockDiskInfoProvider_Usage_Call) RunAndReturn

type MockFileSystem

type MockFileSystem struct {
	mock.Mock
}

MockFileSystem is an autogenerated mock type for the FileSystem type

func NewMockFileSystem

func NewMockFileSystem(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockFileSystem

NewMockFileSystem creates a new instance of MockFileSystem. 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 (*MockFileSystem) EXPECT

func (*MockFileSystem) ReadDir

func (_m *MockFileSystem) ReadDir(name string) ([]fs.DirEntry, error)

ReadDir provides a mock function with given fields: name

func (*MockFileSystem) ReadFile

func (_m *MockFileSystem) ReadFile(name string) ([]byte, error)

ReadFile provides a mock function with given fields: name

func (*MockFileSystem) Stat

func (_m *MockFileSystem) Stat(name string) (fs.FileInfo, error)

Stat provides a mock function with given fields: name

type MockFileSystem_Expecter

type MockFileSystem_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockFileSystem_Expecter) ReadDir

func (_e *MockFileSystem_Expecter) ReadDir(name interface{}) *MockFileSystem_ReadDir_Call

ReadDir is a helper method to define mock.On call

  • name string

func (*MockFileSystem_Expecter) ReadFile

func (_e *MockFileSystem_Expecter) ReadFile(name interface{}) *MockFileSystem_ReadFile_Call

ReadFile is a helper method to define mock.On call

  • name string

func (*MockFileSystem_Expecter) Stat

func (_e *MockFileSystem_Expecter) Stat(name interface{}) *MockFileSystem_Stat_Call

Stat is a helper method to define mock.On call

  • name string

type MockFileSystem_ReadDir_Call

type MockFileSystem_ReadDir_Call struct {
	*mock.Call
}

MockFileSystem_ReadDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDir'

func (*MockFileSystem_ReadDir_Call) Return

func (*MockFileSystem_ReadDir_Call) Run

func (*MockFileSystem_ReadDir_Call) RunAndReturn

type MockFileSystem_ReadFile_Call

type MockFileSystem_ReadFile_Call struct {
	*mock.Call
}

MockFileSystem_ReadFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadFile'

func (*MockFileSystem_ReadFile_Call) Return

func (*MockFileSystem_ReadFile_Call) Run

func (*MockFileSystem_ReadFile_Call) RunAndReturn

type MockFileSystem_Stat_Call

type MockFileSystem_Stat_Call struct {
	*mock.Call
}

MockFileSystem_Stat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stat'

func (*MockFileSystem_Stat_Call) Return

func (*MockFileSystem_Stat_Call) Run

func (_c *MockFileSystem_Stat_Call) Run(run func(name string)) *MockFileSystem_Stat_Call

func (*MockFileSystem_Stat_Call) RunAndReturn

func (_c *MockFileSystem_Stat_Call) RunAndReturn(run func(string) (fs.FileInfo, error)) *MockFileSystem_Stat_Call

type MockHostInfoProvider

type MockHostInfoProvider struct {
	mock.Mock
}

MockHostInfoProvider is an autogenerated mock type for the HostInfoProvider type

func NewMockHostInfoProvider

func NewMockHostInfoProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockHostInfoProvider

NewMockHostInfoProvider creates a new instance of MockHostInfoProvider. 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 (*MockHostInfoProvider) EXPECT

func (*MockHostInfoProvider) Info

func (_m *MockHostInfoProvider) Info() (*host.InfoStat, error)

Info provides a mock function with no fields

func (*MockHostInfoProvider) SensorsTemperatures

func (_m *MockHostInfoProvider) SensorsTemperatures() ([]sensors.TemperatureStat, error)

SensorsTemperatures provides a mock function with no fields

type MockHostInfoProvider_Expecter

type MockHostInfoProvider_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockHostInfoProvider_Expecter) Info

Info is a helper method to define mock.On call

func (*MockHostInfoProvider_Expecter) SensorsTemperatures

SensorsTemperatures is a helper method to define mock.On call

type MockHostInfoProvider_Info_Call

type MockHostInfoProvider_Info_Call struct {
	*mock.Call
}

MockHostInfoProvider_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info'

func (*MockHostInfoProvider_Info_Call) Return

func (*MockHostInfoProvider_Info_Call) Run

func (*MockHostInfoProvider_Info_Call) RunAndReturn

type MockHostInfoProvider_SensorsTemperatures_Call

type MockHostInfoProvider_SensorsTemperatures_Call struct {
	*mock.Call
}

MockHostInfoProvider_SensorsTemperatures_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SensorsTemperatures'

func (*MockHostInfoProvider_SensorsTemperatures_Call) Return

func (*MockHostInfoProvider_SensorsTemperatures_Call) Run

func (*MockHostInfoProvider_SensorsTemperatures_Call) RunAndReturn

type MockLoadInfoProvider

type MockLoadInfoProvider struct {
	mock.Mock
}

MockLoadInfoProvider is an autogenerated mock type for the LoadInfoProvider type

func NewMockLoadInfoProvider

func NewMockLoadInfoProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLoadInfoProvider

NewMockLoadInfoProvider creates a new instance of MockLoadInfoProvider. 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 (*MockLoadInfoProvider) Avg

func (_m *MockLoadInfoProvider) Avg() (*load.AvgStat, error)

Avg provides a mock function with no fields

func (*MockLoadInfoProvider) EXPECT

func (*MockLoadInfoProvider) Misc

func (_m *MockLoadInfoProvider) Misc() (*load.MiscStat, error)

Misc provides a mock function with no fields

type MockLoadInfoProvider_Avg_Call

type MockLoadInfoProvider_Avg_Call struct {
	*mock.Call
}

MockLoadInfoProvider_Avg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Avg'

func (*MockLoadInfoProvider_Avg_Call) Return

func (*MockLoadInfoProvider_Avg_Call) Run

func (*MockLoadInfoProvider_Avg_Call) RunAndReturn

type MockLoadInfoProvider_Expecter

type MockLoadInfoProvider_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockLoadInfoProvider_Expecter) Avg

Avg is a helper method to define mock.On call

func (*MockLoadInfoProvider_Expecter) Misc

Misc is a helper method to define mock.On call

type MockLoadInfoProvider_Misc_Call

type MockLoadInfoProvider_Misc_Call struct {
	*mock.Call
}

MockLoadInfoProvider_Misc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Misc'

func (*MockLoadInfoProvider_Misc_Call) Return

func (*MockLoadInfoProvider_Misc_Call) Run

func (*MockLoadInfoProvider_Misc_Call) RunAndReturn

type MockMemoryInfoProvider

type MockMemoryInfoProvider struct {
	mock.Mock
}

MockMemoryInfoProvider is an autogenerated mock type for the MemoryInfoProvider type

func NewMockMemoryInfoProvider

func NewMockMemoryInfoProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMemoryInfoProvider

NewMockMemoryInfoProvider creates a new instance of MockMemoryInfoProvider. 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 (*MockMemoryInfoProvider) EXPECT

func (*MockMemoryInfoProvider) SwapMemory

func (_m *MockMemoryInfoProvider) SwapMemory() (*mem.SwapMemoryStat, error)

SwapMemory provides a mock function with no fields

func (*MockMemoryInfoProvider) VirtualMemory

func (_m *MockMemoryInfoProvider) VirtualMemory() (*mem.VirtualMemoryStat, error)

VirtualMemory provides a mock function with no fields

type MockMemoryInfoProvider_Expecter

type MockMemoryInfoProvider_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockMemoryInfoProvider_Expecter) SwapMemory

SwapMemory is a helper method to define mock.On call

func (*MockMemoryInfoProvider_Expecter) VirtualMemory

VirtualMemory is a helper method to define mock.On call

type MockMemoryInfoProvider_SwapMemory_Call

type MockMemoryInfoProvider_SwapMemory_Call struct {
	*mock.Call
}

MockMemoryInfoProvider_SwapMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SwapMemory'

func (*MockMemoryInfoProvider_SwapMemory_Call) Return

func (*MockMemoryInfoProvider_SwapMemory_Call) Run

func (*MockMemoryInfoProvider_SwapMemory_Call) RunAndReturn

type MockMemoryInfoProvider_VirtualMemory_Call

type MockMemoryInfoProvider_VirtualMemory_Call struct {
	*mock.Call
}

MockMemoryInfoProvider_VirtualMemory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VirtualMemory'

func (*MockMemoryInfoProvider_VirtualMemory_Call) Return

func (*MockMemoryInfoProvider_VirtualMemory_Call) Run

func (*MockMemoryInfoProvider_VirtualMemory_Call) RunAndReturn

type MockNetworkInfoProvider

type MockNetworkInfoProvider struct {
	mock.Mock
}

MockNetworkInfoProvider is an autogenerated mock type for the NetworkInfoProvider type

func NewMockNetworkInfoProvider

func NewMockNetworkInfoProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockNetworkInfoProvider

NewMockNetworkInfoProvider creates a new instance of MockNetworkInfoProvider. 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 (*MockNetworkInfoProvider) EXPECT

func (*MockNetworkInfoProvider) IOCounters

func (_m *MockNetworkInfoProvider) IOCounters(pernic bool) ([]net.IOCountersStat, error)

IOCounters provides a mock function with given fields: pernic

func (*MockNetworkInfoProvider) Interfaces

func (_m *MockNetworkInfoProvider) Interfaces() ([]net.InterfaceStat, error)

Interfaces provides a mock function with no fields

type MockNetworkInfoProvider_Expecter

type MockNetworkInfoProvider_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockNetworkInfoProvider_Expecter) IOCounters

IOCounters is a helper method to define mock.On call

  • pernic bool

func (*MockNetworkInfoProvider_Expecter) Interfaces

Interfaces is a helper method to define mock.On call

type MockNetworkInfoProvider_IOCounters_Call

type MockNetworkInfoProvider_IOCounters_Call struct {
	*mock.Call
}

MockNetworkInfoProvider_IOCounters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IOCounters'

func (*MockNetworkInfoProvider_IOCounters_Call) Return

func (*MockNetworkInfoProvider_IOCounters_Call) Run

func (*MockNetworkInfoProvider_IOCounters_Call) RunAndReturn

type MockNetworkInfoProvider_Interfaces_Call

type MockNetworkInfoProvider_Interfaces_Call struct {
	*mock.Call
}

MockNetworkInfoProvider_Interfaces_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Interfaces'

func (*MockNetworkInfoProvider_Interfaces_Call) Return

func (*MockNetworkInfoProvider_Interfaces_Call) Run

func (*MockNetworkInfoProvider_Interfaces_Call) RunAndReturn

type MockProcessInfoProvider

type MockProcessInfoProvider struct {
	mock.Mock
}

MockProcessInfoProvider is an autogenerated mock type for the ProcessInfoProvider type

func NewMockProcessInfoProvider

func NewMockProcessInfoProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProcessInfoProvider

NewMockProcessInfoProvider creates a new instance of MockProcessInfoProvider. 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 (*MockProcessInfoProvider) EXPECT

func (*MockProcessInfoProvider) NewProcess

func (_m *MockProcessInfoProvider) NewProcess(pid int32) (*process.Process, error)

NewProcess provides a mock function with given fields: pid

func (*MockProcessInfoProvider) Processes

func (_m *MockProcessInfoProvider) Processes() ([]*process.Process, error)

Processes provides a mock function with no fields

type MockProcessInfoProvider_Expecter

type MockProcessInfoProvider_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockProcessInfoProvider_Expecter) NewProcess

NewProcess is a helper method to define mock.On call

  • pid int32

func (*MockProcessInfoProvider_Expecter) Processes

Processes is a helper method to define mock.On call

type MockProcessInfoProvider_NewProcess_Call

type MockProcessInfoProvider_NewProcess_Call struct {
	*mock.Call
}

MockProcessInfoProvider_NewProcess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewProcess'

func (*MockProcessInfoProvider_NewProcess_Call) Return

func (*MockProcessInfoProvider_NewProcess_Call) Run

func (*MockProcessInfoProvider_NewProcess_Call) RunAndReturn

type MockProcessInfoProvider_Processes_Call

type MockProcessInfoProvider_Processes_Call struct {
	*mock.Call
}

MockProcessInfoProvider_Processes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Processes'

func (*MockProcessInfoProvider_Processes_Call) Return

func (*MockProcessInfoProvider_Processes_Call) Run

func (*MockProcessInfoProvider_Processes_Call) RunAndReturn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL