mocks

package
v1.4.1-prerelease21 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. 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 (*Client) AddCounter

func (_mock *Client) AddCounter(scope metrics.ScopeIdx, counter metrics.MetricIdx, delta int64)

AddCounter provides a mock function for the type Client

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) IncCounter

func (_mock *Client) IncCounter(scope metrics.ScopeIdx, counter metrics.MetricIdx)

IncCounter provides a mock function for the type Client

func (*Client) RecordHistogramDuration added in v0.24.0

func (_mock *Client) RecordHistogramDuration(scope metrics.ScopeIdx, timer metrics.MetricIdx, d time.Duration)

RecordHistogramDuration provides a mock function for the type Client

func (*Client) RecordTimer

func (_mock *Client) RecordTimer(scope metrics.ScopeIdx, timer metrics.MetricIdx, d time.Duration)

RecordTimer provides a mock function for the type Client

func (*Client) Scope added in v0.5.7

func (_mock *Client) Scope(scope metrics.ScopeIdx, tags ...metrics.Tag) metrics.Scope

Scope provides a mock function for the type Client

func (*Client) StartTimer

func (_mock *Client) StartTimer(scope metrics.ScopeIdx, timer metrics.MetricIdx) tally.Stopwatch

StartTimer provides a mock function for the type Client

func (*Client) UpdateGauge

func (_mock *Client) UpdateGauge(scope metrics.ScopeIdx, gauge metrics.MetricIdx, value float64)

UpdateGauge provides a mock function for the type Client

type Client_AddCounter_Call

type Client_AddCounter_Call struct {
	*mock.Call
}

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

func (*Client_AddCounter_Call) Return

func (*Client_AddCounter_Call) Run

func (_c *Client_AddCounter_Call) Run(run func(scope metrics.ScopeIdx, counter metrics.MetricIdx, delta int64)) *Client_AddCounter_Call

func (*Client_AddCounter_Call) RunAndReturn

func (_c *Client_AddCounter_Call) RunAndReturn(run func(scope metrics.ScopeIdx, counter metrics.MetricIdx, delta int64)) *Client_AddCounter_Call

type Client_Expecter

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

func (*Client_Expecter) AddCounter

func (_e *Client_Expecter) AddCounter(scope interface{}, counter interface{}, delta interface{}) *Client_AddCounter_Call

AddCounter is a helper method to define mock.On call

  • scope metrics.ScopeIdx
  • counter metrics.MetricIdx
  • delta int64

func (*Client_Expecter) IncCounter

func (_e *Client_Expecter) IncCounter(scope interface{}, counter interface{}) *Client_IncCounter_Call

IncCounter is a helper method to define mock.On call

  • scope metrics.ScopeIdx
  • counter metrics.MetricIdx

func (*Client_Expecter) RecordHistogramDuration

func (_e *Client_Expecter) RecordHistogramDuration(scope interface{}, timer interface{}, d interface{}) *Client_RecordHistogramDuration_Call

RecordHistogramDuration is a helper method to define mock.On call

  • scope metrics.ScopeIdx
  • timer metrics.MetricIdx
  • d time.Duration

func (*Client_Expecter) RecordTimer

func (_e *Client_Expecter) RecordTimer(scope interface{}, timer interface{}, d interface{}) *Client_RecordTimer_Call

RecordTimer is a helper method to define mock.On call

  • scope metrics.ScopeIdx
  • timer metrics.MetricIdx
  • d time.Duration

func (*Client_Expecter) Scope

func (_e *Client_Expecter) Scope(scope interface{}, tags ...interface{}) *Client_Scope_Call

Scope is a helper method to define mock.On call

  • scope metrics.ScopeIdx
  • tags ...metrics.Tag

func (*Client_Expecter) StartTimer

func (_e *Client_Expecter) StartTimer(scope interface{}, timer interface{}) *Client_StartTimer_Call

StartTimer is a helper method to define mock.On call

  • scope metrics.ScopeIdx
  • timer metrics.MetricIdx

func (*Client_Expecter) UpdateGauge

func (_e *Client_Expecter) UpdateGauge(scope interface{}, gauge interface{}, value interface{}) *Client_UpdateGauge_Call

UpdateGauge is a helper method to define mock.On call

  • scope metrics.ScopeIdx
  • gauge metrics.MetricIdx
  • value float64

type Client_IncCounter_Call

type Client_IncCounter_Call struct {
	*mock.Call
}

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

func (*Client_IncCounter_Call) Return

func (*Client_IncCounter_Call) Run

func (*Client_IncCounter_Call) RunAndReturn

func (_c *Client_IncCounter_Call) RunAndReturn(run func(scope metrics.ScopeIdx, counter metrics.MetricIdx)) *Client_IncCounter_Call

type Client_RecordHistogramDuration_Call

type Client_RecordHistogramDuration_Call struct {
	*mock.Call
}

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

func (*Client_RecordHistogramDuration_Call) Return

func (*Client_RecordHistogramDuration_Call) Run

func (*Client_RecordHistogramDuration_Call) RunAndReturn

type Client_RecordTimer_Call

type Client_RecordTimer_Call struct {
	*mock.Call
}

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

func (*Client_RecordTimer_Call) Return

func (*Client_RecordTimer_Call) Run

func (*Client_RecordTimer_Call) RunAndReturn

func (_c *Client_RecordTimer_Call) RunAndReturn(run func(scope metrics.ScopeIdx, timer metrics.MetricIdx, d time.Duration)) *Client_RecordTimer_Call

type Client_Scope_Call

type Client_Scope_Call struct {
	*mock.Call
}

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

func (*Client_Scope_Call) Return

func (_c *Client_Scope_Call) Return(scope1 metrics.Scope) *Client_Scope_Call

func (*Client_Scope_Call) Run

func (_c *Client_Scope_Call) Run(run func(scope metrics.ScopeIdx, tags ...metrics.Tag)) *Client_Scope_Call

func (*Client_Scope_Call) RunAndReturn

func (_c *Client_Scope_Call) RunAndReturn(run func(scope metrics.ScopeIdx, tags ...metrics.Tag) metrics.Scope) *Client_Scope_Call

type Client_StartTimer_Call

type Client_StartTimer_Call struct {
	*mock.Call
}

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

func (*Client_StartTimer_Call) Return

func (*Client_StartTimer_Call) Run

func (*Client_StartTimer_Call) RunAndReturn

type Client_UpdateGauge_Call

type Client_UpdateGauge_Call struct {
	*mock.Call
}

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

func (*Client_UpdateGauge_Call) Return

func (*Client_UpdateGauge_Call) Run

func (*Client_UpdateGauge_Call) RunAndReturn

func (_c *Client_UpdateGauge_Call) RunAndReturn(run func(scope metrics.ScopeIdx, gauge metrics.MetricIdx, value float64)) *Client_UpdateGauge_Call

type Scope added in v0.5.9

type Scope struct {
	mock.Mock
}

Scope is an autogenerated mock type for the Scope type

func NewScope

func NewScope(t interface {
	mock.TestingT
	Cleanup(func())
}) *Scope

NewScope creates a new instance of Scope. 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 (*Scope) AddCounter added in v0.5.9

func (_mock *Scope) AddCounter(counter metrics.MetricIdx, delta int64)

AddCounter provides a mock function for the type Scope

func (*Scope) EXPECT

func (_m *Scope) EXPECT() *Scope_Expecter

func (*Scope) ExponentialHistogram added in v1.3.6

func (_mock *Scope) ExponentialHistogram(hist metrics.MetricIdx, d time.Duration)

ExponentialHistogram provides a mock function for the type Scope

func (*Scope) IncCounter added in v0.5.9

func (_mock *Scope) IncCounter(counter metrics.MetricIdx)

IncCounter provides a mock function for the type Scope

func (*Scope) IntExponentialHistogram added in v1.3.6

func (_mock *Scope) IntExponentialHistogram(hist metrics.MetricIdx, value int)

IntExponentialHistogram provides a mock function for the type Scope

func (*Scope) RecordHistogramDuration added in v0.6.0

func (_mock *Scope) RecordHistogramDuration(timer metrics.MetricIdx, d time.Duration)

RecordHistogramDuration provides a mock function for the type Scope

func (*Scope) RecordHistogramValue added in v0.6.0

func (_mock *Scope) RecordHistogramValue(timer metrics.MetricIdx, value float64)

RecordHistogramValue provides a mock function for the type Scope

func (*Scope) RecordTimer added in v0.5.9

func (_mock *Scope) RecordTimer(timer metrics.MetricIdx, d time.Duration)

RecordTimer provides a mock function for the type Scope

func (*Scope) StartTimer added in v0.5.9

func (_mock *Scope) StartTimer(timer metrics.MetricIdx) metrics.Stopwatch

StartTimer provides a mock function for the type Scope

func (*Scope) Tagged added in v0.5.9

func (_mock *Scope) Tagged(tags ...metrics.Tag) metrics.Scope

Tagged provides a mock function for the type Scope

func (*Scope) UpdateGauge added in v0.5.9

func (_mock *Scope) UpdateGauge(gauge metrics.MetricIdx, value float64)

UpdateGauge provides a mock function for the type Scope

type Scope_AddCounter_Call

type Scope_AddCounter_Call struct {
	*mock.Call
}

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

func (*Scope_AddCounter_Call) Return

func (*Scope_AddCounter_Call) Run

func (_c *Scope_AddCounter_Call) Run(run func(counter metrics.MetricIdx, delta int64)) *Scope_AddCounter_Call

func (*Scope_AddCounter_Call) RunAndReturn

func (_c *Scope_AddCounter_Call) RunAndReturn(run func(counter metrics.MetricIdx, delta int64)) *Scope_AddCounter_Call

type Scope_Expecter

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

func (*Scope_Expecter) AddCounter

func (_e *Scope_Expecter) AddCounter(counter interface{}, delta interface{}) *Scope_AddCounter_Call

AddCounter is a helper method to define mock.On call

  • counter metrics.MetricIdx
  • delta int64

func (*Scope_Expecter) ExponentialHistogram

func (_e *Scope_Expecter) ExponentialHistogram(hist interface{}, d interface{}) *Scope_ExponentialHistogram_Call

ExponentialHistogram is a helper method to define mock.On call

  • hist metrics.MetricIdx
  • d time.Duration

func (*Scope_Expecter) IncCounter

func (_e *Scope_Expecter) IncCounter(counter interface{}) *Scope_IncCounter_Call

IncCounter is a helper method to define mock.On call

  • counter metrics.MetricIdx

func (*Scope_Expecter) IntExponentialHistogram

func (_e *Scope_Expecter) IntExponentialHistogram(hist interface{}, value interface{}) *Scope_IntExponentialHistogram_Call

IntExponentialHistogram is a helper method to define mock.On call

  • hist metrics.MetricIdx
  • value int

func (*Scope_Expecter) RecordHistogramDuration

func (_e *Scope_Expecter) RecordHistogramDuration(timer interface{}, d interface{}) *Scope_RecordHistogramDuration_Call

RecordHistogramDuration is a helper method to define mock.On call

  • timer metrics.MetricIdx
  • d time.Duration

func (*Scope_Expecter) RecordHistogramValue

func (_e *Scope_Expecter) RecordHistogramValue(timer interface{}, value interface{}) *Scope_RecordHistogramValue_Call

RecordHistogramValue is a helper method to define mock.On call

  • timer metrics.MetricIdx
  • value float64

func (*Scope_Expecter) RecordTimer

func (_e *Scope_Expecter) RecordTimer(timer interface{}, d interface{}) *Scope_RecordTimer_Call

RecordTimer is a helper method to define mock.On call

  • timer metrics.MetricIdx
  • d time.Duration

func (*Scope_Expecter) StartTimer

func (_e *Scope_Expecter) StartTimer(timer interface{}) *Scope_StartTimer_Call

StartTimer is a helper method to define mock.On call

  • timer metrics.MetricIdx

func (*Scope_Expecter) Tagged

func (_e *Scope_Expecter) Tagged(tags ...interface{}) *Scope_Tagged_Call

Tagged is a helper method to define mock.On call

  • tags ...metrics.Tag

func (*Scope_Expecter) UpdateGauge

func (_e *Scope_Expecter) UpdateGauge(gauge interface{}, value interface{}) *Scope_UpdateGauge_Call

UpdateGauge is a helper method to define mock.On call

  • gauge metrics.MetricIdx
  • value float64

type Scope_ExponentialHistogram_Call

type Scope_ExponentialHistogram_Call struct {
	*mock.Call
}

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

func (*Scope_ExponentialHistogram_Call) Return

func (*Scope_ExponentialHistogram_Call) Run

func (*Scope_ExponentialHistogram_Call) RunAndReturn

type Scope_IncCounter_Call

type Scope_IncCounter_Call struct {
	*mock.Call
}

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

func (*Scope_IncCounter_Call) Return

func (*Scope_IncCounter_Call) Run

func (_c *Scope_IncCounter_Call) Run(run func(counter metrics.MetricIdx)) *Scope_IncCounter_Call

func (*Scope_IncCounter_Call) RunAndReturn

func (_c *Scope_IncCounter_Call) RunAndReturn(run func(counter metrics.MetricIdx)) *Scope_IncCounter_Call

type Scope_IntExponentialHistogram_Call

type Scope_IntExponentialHistogram_Call struct {
	*mock.Call
}

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

func (*Scope_IntExponentialHistogram_Call) Return

func (*Scope_IntExponentialHistogram_Call) Run

func (*Scope_IntExponentialHistogram_Call) RunAndReturn

type Scope_RecordHistogramDuration_Call

type Scope_RecordHistogramDuration_Call struct {
	*mock.Call
}

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

func (*Scope_RecordHistogramDuration_Call) Return

func (*Scope_RecordHistogramDuration_Call) Run

func (*Scope_RecordHistogramDuration_Call) RunAndReturn

type Scope_RecordHistogramValue_Call

type Scope_RecordHistogramValue_Call struct {
	*mock.Call
}

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

func (*Scope_RecordHistogramValue_Call) Return

func (*Scope_RecordHistogramValue_Call) Run

func (*Scope_RecordHistogramValue_Call) RunAndReturn

type Scope_RecordTimer_Call

type Scope_RecordTimer_Call struct {
	*mock.Call
}

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

func (*Scope_RecordTimer_Call) Return

func (*Scope_RecordTimer_Call) Run

func (*Scope_RecordTimer_Call) RunAndReturn

func (_c *Scope_RecordTimer_Call) RunAndReturn(run func(timer metrics.MetricIdx, d time.Duration)) *Scope_RecordTimer_Call

type Scope_StartTimer_Call

type Scope_StartTimer_Call struct {
	*mock.Call
}

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

func (*Scope_StartTimer_Call) Return

func (*Scope_StartTimer_Call) Run

func (*Scope_StartTimer_Call) RunAndReturn

type Scope_Tagged_Call

type Scope_Tagged_Call struct {
	*mock.Call
}

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

func (*Scope_Tagged_Call) Return

func (_c *Scope_Tagged_Call) Return(scope metrics.Scope) *Scope_Tagged_Call

func (*Scope_Tagged_Call) Run

func (_c *Scope_Tagged_Call) Run(run func(tags ...metrics.Tag)) *Scope_Tagged_Call

func (*Scope_Tagged_Call) RunAndReturn

func (_c *Scope_Tagged_Call) RunAndReturn(run func(tags ...metrics.Tag) metrics.Scope) *Scope_Tagged_Call

type Scope_UpdateGauge_Call

type Scope_UpdateGauge_Call struct {
	*mock.Call
}

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

func (*Scope_UpdateGauge_Call) Return

func (*Scope_UpdateGauge_Call) Run

func (_c *Scope_UpdateGauge_Call) Run(run func(gauge metrics.MetricIdx, value float64)) *Scope_UpdateGauge_Call

func (*Scope_UpdateGauge_Call) RunAndReturn

func (_c *Scope_UpdateGauge_Call) RunAndReturn(run func(gauge metrics.MetricIdx, value float64)) *Scope_UpdateGauge_Call

Jump to

Keyboard shortcuts

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