Documentation
¶
Index ¶
- type MockEnergyDeriver
- type MockEnergyDeriver_Energy_Call
- type MockEnergyDeriver_Expecter
- type MockEnergyDeriver_Names_Call
- type MockFirstSlotSource
- type MockFirstSlotSource_Expecter
- type MockFirstSlotSource_FirstSlot_Call
- func (_c *MockFirstSlotSource_FirstSlot_Call) Return(slot int64, ok bool, err error) *MockFirstSlotSource_FirstSlot_Call
- func (_c *MockFirstSlotSource_FirstSlot_Call) Run(run func(ctx context.Context)) *MockFirstSlotSource_FirstSlot_Call
- func (_c *MockFirstSlotSource_FirstSlot_Call) RunAndReturn(run func(ctx context.Context) (int64, bool, error)) *MockFirstSlotSource_FirstSlot_Call
- type MockGaugeDeriver
- type MockGaugeDeriver_Expecter
- type MockGaugeDeriver_Gauge_Call
- func (_c *MockGaugeDeriver_Gauge_Call) Return(gaugeResults []derive.GaugeResult, err error) *MockGaugeDeriver_Gauge_Call
- func (_c *MockGaugeDeriver_Gauge_Call) Run(run func(ctx context.Context, names []string, from time.Time, to time.Time)) *MockGaugeDeriver_Gauge_Call
- func (_c *MockGaugeDeriver_Gauge_Call) RunAndReturn(...) *MockGaugeDeriver_Gauge_Call
- type MockProfileSource
- type MockProfileSource_Expecter
- type MockProfileSource_IDs_Call
- type MockProfileSource_Load_Call
- func (_c *MockProfileSource_Load_Call) Return(loaded *profile.Loaded, err error) *MockProfileSource_Load_Call
- func (_c *MockProfileSource_Load_Call) Run(run func(ref string, baseDir string)) *MockProfileSource_Load_Call
- func (_c *MockProfileSource_Load_Call) RunAndReturn(run func(ref string, baseDir string) (*profile.Loaded, error)) *MockProfileSource_Load_Call
- type MockSnapshotSource
- type MockSnapshotSource_Expecter
- type MockSnapshotSource_Snapshot_Call
- func (_c *MockSnapshotSource_Snapshot_Call) Return(snapshot health.Snapshot) *MockSnapshotSource_Snapshot_Call
- func (_c *MockSnapshotSource_Snapshot_Call) Run(run func()) *MockSnapshotSource_Snapshot_Call
- func (_c *MockSnapshotSource_Snapshot_Call) RunAndReturn(run func() health.Snapshot) *MockSnapshotSource_Snapshot_Call
- type MockStatusReader
- type MockStatusReader_Expecter
- type MockStatusReader_StatusEvents_Call
- func (_c *MockStatusReader_StatusEvents_Call) Return(statusEvents []storage.StatusEvent, err error) *MockStatusReader_StatusEvents_Call
- func (_c *MockStatusReader_StatusEvents_Call) Run(run func(ctx context.Context, device string, from int64, to int64, limit int)) *MockStatusReader_StatusEvents_Call
- func (_c *MockStatusReader_StatusEvents_Call) RunAndReturn(...) *MockStatusReader_StatusEvents_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockEnergyDeriver ¶
MockEnergyDeriver is an autogenerated mock type for the EnergyDeriver type
func NewMockEnergyDeriver ¶
func NewMockEnergyDeriver(t interface {
mock.TestingT
Cleanup(func())
}) *MockEnergyDeriver
NewMockEnergyDeriver creates a new instance of MockEnergyDeriver. 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 (*MockEnergyDeriver) EXPECT ¶
func (_m *MockEnergyDeriver) EXPECT() *MockEnergyDeriver_Expecter
func (*MockEnergyDeriver) Energy ¶
func (_mock *MockEnergyDeriver) Energy(ctx context.Context, names []string, level derive.Level, from time.Time, to time.Time) ([]derive.Result, error)
Energy provides a mock function for the type MockEnergyDeriver
func (*MockEnergyDeriver) Names ¶
func (_mock *MockEnergyDeriver) Names() []string
Names provides a mock function for the type MockEnergyDeriver
type MockEnergyDeriver_Energy_Call ¶
MockEnergyDeriver_Energy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Energy'
func (*MockEnergyDeriver_Energy_Call) Return ¶
func (_c *MockEnergyDeriver_Energy_Call) Return(results []derive.Result, err error) *MockEnergyDeriver_Energy_Call
type MockEnergyDeriver_Expecter ¶
type MockEnergyDeriver_Expecter struct {
// contains filtered or unexported fields
}
func (*MockEnergyDeriver_Expecter) Energy ¶
func (_e *MockEnergyDeriver_Expecter) Energy(ctx any, names any, level any, from any, to any) *MockEnergyDeriver_Energy_Call
Energy is a helper method to define mock.On call
- ctx context.Context
- names []string
- level derive.Level
- from time.Time
- to time.Time
func (*MockEnergyDeriver_Expecter) Names ¶
func (_e *MockEnergyDeriver_Expecter) Names() *MockEnergyDeriver_Names_Call
Names is a helper method to define mock.On call
type MockEnergyDeriver_Names_Call ¶
MockEnergyDeriver_Names_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Names'
func (*MockEnergyDeriver_Names_Call) Return ¶
func (_c *MockEnergyDeriver_Names_Call) Return(strings []string) *MockEnergyDeriver_Names_Call
func (*MockEnergyDeriver_Names_Call) Run ¶
func (_c *MockEnergyDeriver_Names_Call) Run(run func()) *MockEnergyDeriver_Names_Call
func (*MockEnergyDeriver_Names_Call) RunAndReturn ¶
func (_c *MockEnergyDeriver_Names_Call) RunAndReturn(run func() []string) *MockEnergyDeriver_Names_Call
type MockFirstSlotSource ¶
MockFirstSlotSource is an autogenerated mock type for the FirstSlotSource type
func NewMockFirstSlotSource ¶
func NewMockFirstSlotSource(t interface {
mock.TestingT
Cleanup(func())
}) *MockFirstSlotSource
NewMockFirstSlotSource creates a new instance of MockFirstSlotSource. 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 (*MockFirstSlotSource) EXPECT ¶
func (_m *MockFirstSlotSource) EXPECT() *MockFirstSlotSource_Expecter
type MockFirstSlotSource_Expecter ¶
type MockFirstSlotSource_Expecter struct {
// contains filtered or unexported fields
}
func (*MockFirstSlotSource_Expecter) FirstSlot ¶
func (_e *MockFirstSlotSource_Expecter) FirstSlot(ctx any) *MockFirstSlotSource_FirstSlot_Call
FirstSlot is a helper method to define mock.On call
- ctx context.Context
type MockFirstSlotSource_FirstSlot_Call ¶
MockFirstSlotSource_FirstSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FirstSlot'
func (*MockFirstSlotSource_FirstSlot_Call) Return ¶
func (_c *MockFirstSlotSource_FirstSlot_Call) Return(slot int64, ok bool, err error) *MockFirstSlotSource_FirstSlot_Call
func (*MockFirstSlotSource_FirstSlot_Call) Run ¶
func (_c *MockFirstSlotSource_FirstSlot_Call) Run(run func(ctx context.Context)) *MockFirstSlotSource_FirstSlot_Call
func (*MockFirstSlotSource_FirstSlot_Call) RunAndReturn ¶
func (_c *MockFirstSlotSource_FirstSlot_Call) RunAndReturn(run func(ctx context.Context) (int64, bool, error)) *MockFirstSlotSource_FirstSlot_Call
type MockGaugeDeriver ¶
MockGaugeDeriver is an autogenerated mock type for the GaugeDeriver type
func NewMockGaugeDeriver ¶
func NewMockGaugeDeriver(t interface {
mock.TestingT
Cleanup(func())
}) *MockGaugeDeriver
NewMockGaugeDeriver creates a new instance of MockGaugeDeriver. 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 (*MockGaugeDeriver) EXPECT ¶
func (_m *MockGaugeDeriver) EXPECT() *MockGaugeDeriver_Expecter
type MockGaugeDeriver_Expecter ¶
type MockGaugeDeriver_Expecter struct {
// contains filtered or unexported fields
}
func (*MockGaugeDeriver_Expecter) Gauge ¶
func (_e *MockGaugeDeriver_Expecter) Gauge(ctx any, names any, from any, to any) *MockGaugeDeriver_Gauge_Call
Gauge is a helper method to define mock.On call
- ctx context.Context
- names []string
- from time.Time
- to time.Time
type MockGaugeDeriver_Gauge_Call ¶
MockGaugeDeriver_Gauge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Gauge'
func (*MockGaugeDeriver_Gauge_Call) Return ¶
func (_c *MockGaugeDeriver_Gauge_Call) Return(gaugeResults []derive.GaugeResult, err error) *MockGaugeDeriver_Gauge_Call
func (*MockGaugeDeriver_Gauge_Call) Run ¶
func (_c *MockGaugeDeriver_Gauge_Call) Run(run func(ctx context.Context, names []string, from time.Time, to time.Time)) *MockGaugeDeriver_Gauge_Call
func (*MockGaugeDeriver_Gauge_Call) RunAndReturn ¶
func (_c *MockGaugeDeriver_Gauge_Call) RunAndReturn(run func(ctx context.Context, names []string, from time.Time, to time.Time) ([]derive.GaugeResult, error)) *MockGaugeDeriver_Gauge_Call
type MockProfileSource ¶
MockProfileSource is an autogenerated mock type for the ProfileSource type
func NewMockProfileSource ¶
func NewMockProfileSource(t interface {
mock.TestingT
Cleanup(func())
}) *MockProfileSource
NewMockProfileSource creates a new instance of MockProfileSource. 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 (*MockProfileSource) EXPECT ¶
func (_m *MockProfileSource) EXPECT() *MockProfileSource_Expecter
func (*MockProfileSource) IDs ¶
func (_mock *MockProfileSource) IDs() []string
IDs provides a mock function for the type MockProfileSource
type MockProfileSource_Expecter ¶
type MockProfileSource_Expecter struct {
// contains filtered or unexported fields
}
func (*MockProfileSource_Expecter) IDs ¶
func (_e *MockProfileSource_Expecter) IDs() *MockProfileSource_IDs_Call
IDs is a helper method to define mock.On call
func (*MockProfileSource_Expecter) Load ¶
func (_e *MockProfileSource_Expecter) Load(ref any, baseDir any) *MockProfileSource_Load_Call
Load is a helper method to define mock.On call
- ref string
- baseDir string
type MockProfileSource_IDs_Call ¶
MockProfileSource_IDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IDs'
func (*MockProfileSource_IDs_Call) Return ¶
func (_c *MockProfileSource_IDs_Call) Return(strings []string) *MockProfileSource_IDs_Call
func (*MockProfileSource_IDs_Call) Run ¶
func (_c *MockProfileSource_IDs_Call) Run(run func()) *MockProfileSource_IDs_Call
func (*MockProfileSource_IDs_Call) RunAndReturn ¶
func (_c *MockProfileSource_IDs_Call) RunAndReturn(run func() []string) *MockProfileSource_IDs_Call
type MockProfileSource_Load_Call ¶
MockProfileSource_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load'
func (*MockProfileSource_Load_Call) Return ¶
func (_c *MockProfileSource_Load_Call) Return(loaded *profile.Loaded, err error) *MockProfileSource_Load_Call
func (*MockProfileSource_Load_Call) Run ¶
func (_c *MockProfileSource_Load_Call) Run(run func(ref string, baseDir string)) *MockProfileSource_Load_Call
func (*MockProfileSource_Load_Call) RunAndReturn ¶
func (_c *MockProfileSource_Load_Call) RunAndReturn(run func(ref string, baseDir string) (*profile.Loaded, error)) *MockProfileSource_Load_Call
type MockSnapshotSource ¶
MockSnapshotSource is an autogenerated mock type for the SnapshotSource type
func NewMockSnapshotSource ¶
func NewMockSnapshotSource(t interface {
mock.TestingT
Cleanup(func())
}) *MockSnapshotSource
NewMockSnapshotSource creates a new instance of MockSnapshotSource. 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 (*MockSnapshotSource) EXPECT ¶
func (_m *MockSnapshotSource) EXPECT() *MockSnapshotSource_Expecter
func (*MockSnapshotSource) Snapshot ¶
func (_mock *MockSnapshotSource) Snapshot() health.Snapshot
Snapshot provides a mock function for the type MockSnapshotSource
type MockSnapshotSource_Expecter ¶
type MockSnapshotSource_Expecter struct {
// contains filtered or unexported fields
}
func (*MockSnapshotSource_Expecter) Snapshot ¶
func (_e *MockSnapshotSource_Expecter) Snapshot() *MockSnapshotSource_Snapshot_Call
Snapshot is a helper method to define mock.On call
type MockSnapshotSource_Snapshot_Call ¶
MockSnapshotSource_Snapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Snapshot'
func (*MockSnapshotSource_Snapshot_Call) Return ¶
func (_c *MockSnapshotSource_Snapshot_Call) Return(snapshot health.Snapshot) *MockSnapshotSource_Snapshot_Call
func (*MockSnapshotSource_Snapshot_Call) Run ¶
func (_c *MockSnapshotSource_Snapshot_Call) Run(run func()) *MockSnapshotSource_Snapshot_Call
func (*MockSnapshotSource_Snapshot_Call) RunAndReturn ¶
func (_c *MockSnapshotSource_Snapshot_Call) RunAndReturn(run func() health.Snapshot) *MockSnapshotSource_Snapshot_Call
type MockStatusReader ¶
MockStatusReader is an autogenerated mock type for the StatusReader type
func NewMockStatusReader ¶
func NewMockStatusReader(t interface {
mock.TestingT
Cleanup(func())
}) *MockStatusReader
NewMockStatusReader creates a new instance of MockStatusReader. 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 (*MockStatusReader) EXPECT ¶
func (_m *MockStatusReader) EXPECT() *MockStatusReader_Expecter
func (*MockStatusReader) StatusEvents ¶
func (_mock *MockStatusReader) StatusEvents(ctx context.Context, device string, from int64, to int64, limit int) ([]storage.StatusEvent, error)
StatusEvents provides a mock function for the type MockStatusReader
type MockStatusReader_Expecter ¶
type MockStatusReader_Expecter struct {
// contains filtered or unexported fields
}
func (*MockStatusReader_Expecter) StatusEvents ¶
func (_e *MockStatusReader_Expecter) StatusEvents(ctx any, device any, from any, to any, limit any) *MockStatusReader_StatusEvents_Call
StatusEvents is a helper method to define mock.On call
- ctx context.Context
- device string
- from int64
- to int64
- limit int
type MockStatusReader_StatusEvents_Call ¶
MockStatusReader_StatusEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StatusEvents'
func (*MockStatusReader_StatusEvents_Call) Return ¶
func (_c *MockStatusReader_StatusEvents_Call) Return(statusEvents []storage.StatusEvent, err error) *MockStatusReader_StatusEvents_Call
func (*MockStatusReader_StatusEvents_Call) Run ¶
func (_c *MockStatusReader_StatusEvents_Call) Run(run func(ctx context.Context, device string, from int64, to int64, limit int)) *MockStatusReader_StatusEvents_Call
func (*MockStatusReader_StatusEvents_Call) RunAndReturn ¶
func (_c *MockStatusReader_StatusEvents_Call) RunAndReturn(run func(ctx context.Context, device string, from int64, to int64, limit int) ([]storage.StatusEvent, error)) *MockStatusReader_StatusEvents_Call