metrics

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMetric

type MockMetric struct {
	mock.Mock
}

MockMetric is an autogenerated mock type for the Metric type

func NewMockMetric

func NewMockMetric(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMetric

NewMockMetric creates a new instance of MockMetric. 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 (*MockMetric) Compare

func (_m *MockMetric) Compare(operator metrics.MetricOperator, value float64) (bool, error)

Compare provides a mock function with given fields: operator, value

func (*MockMetric) EXPECT

func (_m *MockMetric) EXPECT() *MockMetric_Expecter

type MockMetric_Compare_Call

type MockMetric_Compare_Call struct {
	*mock.Call
}

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

func (*MockMetric_Compare_Call) Return

func (*MockMetric_Compare_Call) Run

func (*MockMetric_Compare_Call) RunAndReturn

type MockMetric_Expecter

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

func (*MockMetric_Expecter) Compare

func (_e *MockMetric_Expecter) Compare(operator interface{}, value interface{}) *MockMetric_Compare_Call

Compare is a helper method to define mock.On call

  • operator metrics.MetricOperator
  • value float64

type MockMetrics

type MockMetrics struct {
	mock.Mock
}

MockMetrics is an autogenerated mock type for the Metrics type

func NewMockMetrics

func NewMockMetrics(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMetrics

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

func (_m *MockMetrics) EXPECT() *MockMetrics_Expecter

func (*MockMetrics) Find

func (_m *MockMetrics) Find(name string) (metrics.Metric, error)

Find provides a mock function with given fields: name

type MockMetrics_Expecter

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

func (*MockMetrics_Expecter) Find

func (_e *MockMetrics_Expecter) Find(name interface{}) *MockMetrics_Find_Call

Find is a helper method to define mock.On call

  • name string

type MockMetrics_Find_Call

type MockMetrics_Find_Call struct {
	*mock.Call
}

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

func (*MockMetrics_Find_Call) Return

func (*MockMetrics_Find_Call) Run

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

func (*MockMetrics_Find_Call) RunAndReturn

func (_c *MockMetrics_Find_Call) RunAndReturn(run func(string) (metrics.Metric, error)) *MockMetrics_Find_Call

Jump to

Keyboard shortcuts

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