mock_otel

package
v17.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 5 Imported by: 0

README

OpenTelemetry uses embedded interfaces with unexported methods. gomock does not support that, see https://github.com/uber-go/mock/issues/23 and https://github.com/uber-go/mock/issues/64. We patch the generated mocks manually here.

  • Use generate_otel_fixed.sh to generate otel_fixed.go from the gomock-generated otel.go. This uses the existing patch (if it can be applied).
  • Make necessary changes, like adding embedded interfaces to new mocks.
  • Run generate_patch.sh to regenerate the otel.go.patch patch file.
  • Run apply_patch.sh to apply the patch to otel.go.
  • Remove or rename otel_fixed.go and check if things work.

Documentation

Overview

Package mock_otel is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockInt64Counter

type MockInt64Counter struct {
	embedded.Int64Counter
	// contains filtered or unexported fields
}

MockInt64Counter is a mock of Int64Counter interface.

func NewMockInt64Counter

func NewMockInt64Counter(ctrl *gomock.Controller) *MockInt64Counter

NewMockInt64Counter creates a new mock instance.

func (*MockInt64Counter) Add

func (m *MockInt64Counter) Add(arg0 context.Context, arg1 int64, arg2 ...metric.AddOption)

Add mocks base method.

func (*MockInt64Counter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockInt64CounterAddCall

type MockInt64CounterAddCall struct {
	*gomock.Call
}

MockInt64CounterAddCall wrap *gomock.Call

func (*MockInt64CounterAddCall) Do

Do rewrite *gomock.Call.Do

func (*MockInt64CounterAddCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockInt64CounterAddCall) Return

Return rewrite *gomock.Call.Return

type MockInt64CounterMockRecorder

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

MockInt64CounterMockRecorder is the mock recorder for MockInt64Counter.

func (*MockInt64CounterMockRecorder) Add

func (mr *MockInt64CounterMockRecorder) Add(arg0, arg1 any, arg2 ...any) *MockInt64CounterAddCall

Add indicates an expected call of Add.

type MockInt64Counterint64CounterCall

type MockInt64Counterint64CounterCall struct {
	*gomock.Call
}

MockInt64Counterint64CounterCall wrap *gomock.Call

func (*MockInt64Counterint64CounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockInt64Counterint64CounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockInt64Counterint64CounterCall) Return

Return rewrite *gomock.Call.Return

type MockInt64UpDownCounter

type MockInt64UpDownCounter struct {
	embedded.Int64UpDownCounter
	// contains filtered or unexported fields
}

MockInt64UpDownCounter is a mock of Int64UpDownCounter interface.

func NewMockInt64UpDownCounter

func NewMockInt64UpDownCounter(ctrl *gomock.Controller) *MockInt64UpDownCounter

NewMockInt64UpDownCounter creates a new mock instance.

func (*MockInt64UpDownCounter) Add

func (m *MockInt64UpDownCounter) Add(arg0 context.Context, arg1 int64, arg2 ...metric.AddOption)

Add mocks base method.

func (*MockInt64UpDownCounter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockInt64UpDownCounterAddCall

type MockInt64UpDownCounterAddCall struct {
	*gomock.Call
}

MockInt64UpDownCounterAddCall wrap *gomock.Call

func (*MockInt64UpDownCounterAddCall) Do

Do rewrite *gomock.Call.Do

func (*MockInt64UpDownCounterAddCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockInt64UpDownCounterAddCall) Return

Return rewrite *gomock.Call.Return

type MockInt64UpDownCounterMockRecorder

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

MockInt64UpDownCounterMockRecorder is the mock recorder for MockInt64UpDownCounter.

func (*MockInt64UpDownCounterMockRecorder) Add

Add indicates an expected call of Add.

type MockInt64UpDownCounterint64UpDownCounterCall

type MockInt64UpDownCounterint64UpDownCounterCall struct {
	*gomock.Call
}

MockInt64UpDownCounterint64UpDownCounterCall wrap *gomock.Call

func (*MockInt64UpDownCounterint64UpDownCounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockInt64UpDownCounterint64UpDownCounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockInt64UpDownCounterint64UpDownCounterCall) Return

Return rewrite *gomock.Call.Return

type MockMeter

type MockMeter struct {
	embedded.Meter
	// contains filtered or unexported fields
}

MockMeter is a mock of Meter interface.

func NewMockMeter

func NewMockMeter(ctrl *gomock.Controller) *MockMeter

NewMockMeter creates a new mock instance.

func (*MockMeter) EXPECT

func (m *MockMeter) EXPECT() *MockMeterMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMeter) Float64Counter

func (m *MockMeter) Float64Counter(arg0 string, arg1 ...metric.Float64CounterOption) (metric.Float64Counter, error)

Float64Counter mocks base method.

func (*MockMeter) Float64Gauge added in v17.1.0

func (m *MockMeter) Float64Gauge(arg0 string, arg1 ...metric.Float64GaugeOption) (metric.Float64Gauge, error)

Float64Gauge mocks base method.

func (*MockMeter) Float64Histogram

func (m *MockMeter) Float64Histogram(arg0 string, arg1 ...metric.Float64HistogramOption) (metric.Float64Histogram, error)

Float64Histogram mocks base method.

func (*MockMeter) Float64ObservableCounter

func (m *MockMeter) Float64ObservableCounter(arg0 string, arg1 ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error)

Float64ObservableCounter mocks base method.

func (*MockMeter) Float64ObservableGauge

func (m *MockMeter) Float64ObservableGauge(arg0 string, arg1 ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error)

Float64ObservableGauge mocks base method.

func (*MockMeter) Float64ObservableUpDownCounter

func (m *MockMeter) Float64ObservableUpDownCounter(arg0 string, arg1 ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error)

Float64ObservableUpDownCounter mocks base method.

func (*MockMeter) Float64UpDownCounter

func (m *MockMeter) Float64UpDownCounter(arg0 string, arg1 ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error)

Float64UpDownCounter mocks base method.

func (*MockMeter) Int64Counter

func (m *MockMeter) Int64Counter(arg0 string, arg1 ...metric.Int64CounterOption) (metric.Int64Counter, error)

Int64Counter mocks base method.

func (*MockMeter) Int64Gauge added in v17.1.0

func (m *MockMeter) Int64Gauge(arg0 string, arg1 ...metric.Int64GaugeOption) (metric.Int64Gauge, error)

Int64Gauge mocks base method.

func (*MockMeter) Int64Histogram

func (m *MockMeter) Int64Histogram(arg0 string, arg1 ...metric.Int64HistogramOption) (metric.Int64Histogram, error)

Int64Histogram mocks base method.

func (*MockMeter) Int64ObservableCounter

func (m *MockMeter) Int64ObservableCounter(arg0 string, arg1 ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error)

Int64ObservableCounter mocks base method.

func (*MockMeter) Int64ObservableGauge

func (m *MockMeter) Int64ObservableGauge(arg0 string, arg1 ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error)

Int64ObservableGauge mocks base method.

func (*MockMeter) Int64ObservableUpDownCounter

func (m *MockMeter) Int64ObservableUpDownCounter(arg0 string, arg1 ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error)

Int64ObservableUpDownCounter mocks base method.

func (*MockMeter) Int64UpDownCounter

func (m *MockMeter) Int64UpDownCounter(arg0 string, arg1 ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error)

Int64UpDownCounter mocks base method.

func (*MockMeter) RegisterCallback

func (m *MockMeter) RegisterCallback(arg0 metric.Callback, arg1 ...metric.Observable) (metric.Registration, error)

RegisterCallback mocks base method.

type MockMeterFloat64CounterCall

type MockMeterFloat64CounterCall struct {
	*gomock.Call
}

MockMeterFloat64CounterCall wrap *gomock.Call

func (*MockMeterFloat64CounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterFloat64CounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterFloat64CounterCall) Return

Return rewrite *gomock.Call.Return

type MockMeterFloat64GaugeCall added in v17.1.0

type MockMeterFloat64GaugeCall struct {
	*gomock.Call
}

MockMeterFloat64GaugeCall wrap *gomock.Call

func (*MockMeterFloat64GaugeCall) Do added in v17.1.0

Do rewrite *gomock.Call.Do

func (*MockMeterFloat64GaugeCall) DoAndReturn added in v17.1.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterFloat64GaugeCall) Return added in v17.1.0

Return rewrite *gomock.Call.Return

type MockMeterFloat64HistogramCall

type MockMeterFloat64HistogramCall struct {
	*gomock.Call
}

MockMeterFloat64HistogramCall wrap *gomock.Call

func (*MockMeterFloat64HistogramCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterFloat64HistogramCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterFloat64HistogramCall) Return

Return rewrite *gomock.Call.Return

type MockMeterFloat64ObservableCounterCall

type MockMeterFloat64ObservableCounterCall struct {
	*gomock.Call
}

MockMeterFloat64ObservableCounterCall wrap *gomock.Call

func (*MockMeterFloat64ObservableCounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterFloat64ObservableCounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterFloat64ObservableCounterCall) Return

Return rewrite *gomock.Call.Return

type MockMeterFloat64ObservableGaugeCall

type MockMeterFloat64ObservableGaugeCall struct {
	*gomock.Call
}

MockMeterFloat64ObservableGaugeCall wrap *gomock.Call

func (*MockMeterFloat64ObservableGaugeCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterFloat64ObservableGaugeCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterFloat64ObservableGaugeCall) Return

Return rewrite *gomock.Call.Return

type MockMeterFloat64ObservableUpDownCounterCall

type MockMeterFloat64ObservableUpDownCounterCall struct {
	*gomock.Call
}

MockMeterFloat64ObservableUpDownCounterCall wrap *gomock.Call

func (*MockMeterFloat64ObservableUpDownCounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterFloat64ObservableUpDownCounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterFloat64ObservableUpDownCounterCall) Return

Return rewrite *gomock.Call.Return

type MockMeterFloat64UpDownCounterCall

type MockMeterFloat64UpDownCounterCall struct {
	*gomock.Call
}

MockMeterFloat64UpDownCounterCall wrap *gomock.Call

func (*MockMeterFloat64UpDownCounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterFloat64UpDownCounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterFloat64UpDownCounterCall) Return

Return rewrite *gomock.Call.Return

type MockMeterInt64CounterCall

type MockMeterInt64CounterCall struct {
	*gomock.Call
}

MockMeterInt64CounterCall wrap *gomock.Call

func (*MockMeterInt64CounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterInt64CounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterInt64CounterCall) Return

Return rewrite *gomock.Call.Return

type MockMeterInt64GaugeCall added in v17.1.0

type MockMeterInt64GaugeCall struct {
	*gomock.Call
}

MockMeterInt64GaugeCall wrap *gomock.Call

func (*MockMeterInt64GaugeCall) Do added in v17.1.0

Do rewrite *gomock.Call.Do

func (*MockMeterInt64GaugeCall) DoAndReturn added in v17.1.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterInt64GaugeCall) Return added in v17.1.0

Return rewrite *gomock.Call.Return

type MockMeterInt64HistogramCall

type MockMeterInt64HistogramCall struct {
	*gomock.Call
}

MockMeterInt64HistogramCall wrap *gomock.Call

func (*MockMeterInt64HistogramCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterInt64HistogramCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterInt64HistogramCall) Return

Return rewrite *gomock.Call.Return

type MockMeterInt64ObservableCounterCall

type MockMeterInt64ObservableCounterCall struct {
	*gomock.Call
}

MockMeterInt64ObservableCounterCall wrap *gomock.Call

func (*MockMeterInt64ObservableCounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterInt64ObservableCounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterInt64ObservableCounterCall) Return

Return rewrite *gomock.Call.Return

type MockMeterInt64ObservableGaugeCall

type MockMeterInt64ObservableGaugeCall struct {
	*gomock.Call
}

MockMeterInt64ObservableGaugeCall wrap *gomock.Call

func (*MockMeterInt64ObservableGaugeCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterInt64ObservableGaugeCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterInt64ObservableGaugeCall) Return

Return rewrite *gomock.Call.Return

type MockMeterInt64ObservableUpDownCounterCall

type MockMeterInt64ObservableUpDownCounterCall struct {
	*gomock.Call
}

MockMeterInt64ObservableUpDownCounterCall wrap *gomock.Call

func (*MockMeterInt64ObservableUpDownCounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterInt64ObservableUpDownCounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterInt64ObservableUpDownCounterCall) Return

Return rewrite *gomock.Call.Return

type MockMeterInt64UpDownCounterCall

type MockMeterInt64UpDownCounterCall struct {
	*gomock.Call
}

MockMeterInt64UpDownCounterCall wrap *gomock.Call

func (*MockMeterInt64UpDownCounterCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterInt64UpDownCounterCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterInt64UpDownCounterCall) Return

Return rewrite *gomock.Call.Return

type MockMeterMockRecorder

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

MockMeterMockRecorder is the mock recorder for MockMeter.

func (*MockMeterMockRecorder) Float64Counter

func (mr *MockMeterMockRecorder) Float64Counter(arg0 any, arg1 ...any) *MockMeterFloat64CounterCall

Float64Counter indicates an expected call of Float64Counter.

func (*MockMeterMockRecorder) Float64Gauge added in v17.1.0

func (mr *MockMeterMockRecorder) Float64Gauge(arg0 any, arg1 ...any) *MockMeterFloat64GaugeCall

Float64Gauge indicates an expected call of Float64Gauge.

func (*MockMeterMockRecorder) Float64Histogram

func (mr *MockMeterMockRecorder) Float64Histogram(arg0 any, arg1 ...any) *MockMeterFloat64HistogramCall

Float64Histogram indicates an expected call of Float64Histogram.

func (*MockMeterMockRecorder) Float64ObservableCounter

func (mr *MockMeterMockRecorder) Float64ObservableCounter(arg0 any, arg1 ...any) *MockMeterFloat64ObservableCounterCall

Float64ObservableCounter indicates an expected call of Float64ObservableCounter.

func (*MockMeterMockRecorder) Float64ObservableGauge

func (mr *MockMeterMockRecorder) Float64ObservableGauge(arg0 any, arg1 ...any) *MockMeterFloat64ObservableGaugeCall

Float64ObservableGauge indicates an expected call of Float64ObservableGauge.

func (*MockMeterMockRecorder) Float64ObservableUpDownCounter

func (mr *MockMeterMockRecorder) Float64ObservableUpDownCounter(arg0 any, arg1 ...any) *MockMeterFloat64ObservableUpDownCounterCall

Float64ObservableUpDownCounter indicates an expected call of Float64ObservableUpDownCounter.

func (*MockMeterMockRecorder) Float64UpDownCounter

func (mr *MockMeterMockRecorder) Float64UpDownCounter(arg0 any, arg1 ...any) *MockMeterFloat64UpDownCounterCall

Float64UpDownCounter indicates an expected call of Float64UpDownCounter.

func (*MockMeterMockRecorder) Int64Counter

func (mr *MockMeterMockRecorder) Int64Counter(arg0 any, arg1 ...any) *MockMeterInt64CounterCall

Int64Counter indicates an expected call of Int64Counter.

func (*MockMeterMockRecorder) Int64Gauge added in v17.1.0

func (mr *MockMeterMockRecorder) Int64Gauge(arg0 any, arg1 ...any) *MockMeterInt64GaugeCall

Int64Gauge indicates an expected call of Int64Gauge.

func (*MockMeterMockRecorder) Int64Histogram

func (mr *MockMeterMockRecorder) Int64Histogram(arg0 any, arg1 ...any) *MockMeterInt64HistogramCall

Int64Histogram indicates an expected call of Int64Histogram.

func (*MockMeterMockRecorder) Int64ObservableCounter

func (mr *MockMeterMockRecorder) Int64ObservableCounter(arg0 any, arg1 ...any) *MockMeterInt64ObservableCounterCall

Int64ObservableCounter indicates an expected call of Int64ObservableCounter.

func (*MockMeterMockRecorder) Int64ObservableGauge

func (mr *MockMeterMockRecorder) Int64ObservableGauge(arg0 any, arg1 ...any) *MockMeterInt64ObservableGaugeCall

Int64ObservableGauge indicates an expected call of Int64ObservableGauge.

func (*MockMeterMockRecorder) Int64ObservableUpDownCounter

func (mr *MockMeterMockRecorder) Int64ObservableUpDownCounter(arg0 any, arg1 ...any) *MockMeterInt64ObservableUpDownCounterCall

Int64ObservableUpDownCounter indicates an expected call of Int64ObservableUpDownCounter.

func (*MockMeterMockRecorder) Int64UpDownCounter

func (mr *MockMeterMockRecorder) Int64UpDownCounter(arg0 any, arg1 ...any) *MockMeterInt64UpDownCounterCall

Int64UpDownCounter indicates an expected call of Int64UpDownCounter.

func (*MockMeterMockRecorder) RegisterCallback

func (mr *MockMeterMockRecorder) RegisterCallback(arg0 any, arg1 ...any) *MockMeterRegisterCallbackCall

RegisterCallback indicates an expected call of RegisterCallback.

type MockMeterRegisterCallbackCall

type MockMeterRegisterCallbackCall struct {
	*gomock.Call
}

MockMeterRegisterCallbackCall wrap *gomock.Call

func (*MockMeterRegisterCallbackCall) Do

Do rewrite *gomock.Call.Do

func (*MockMeterRegisterCallbackCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMeterRegisterCallbackCall) Return

Return rewrite *gomock.Call.Return

type MockMetermeterCall

type MockMetermeterCall struct {
	*gomock.Call
}

MockMetermeterCall wrap *gomock.Call

func (*MockMetermeterCall) Do

func (c *MockMetermeterCall) Do(f func()) *MockMetermeterCall

Do rewrite *gomock.Call.Do

func (*MockMetermeterCall) DoAndReturn

func (c *MockMetermeterCall) DoAndReturn(f func()) *MockMetermeterCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockMetermeterCall) Return

Return rewrite *gomock.Call.Return

Jump to

Keyboard shortcuts

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