mocks

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIMetrics

type APIMetrics struct {
	mock.Mock
}

APIMetrics is an autogenerated mock type for the APIMetrics type

func NewAPIMetrics

func NewAPIMetrics(t interface {
	mock.TestingT
	Cleanup(func())
}) *APIMetrics

NewAPIMetrics creates a new instance of APIMetrics. 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 (*APIMetrics) AddHTTPStatusCode

func (_m *APIMetrics) AddHTTPStatusCode(providerName string, resp *http.Response)

AddHTTPStatusCode provides a mock function with given fields: providerName, resp

func (*APIMetrics) AddProviderResponse

func (_m *APIMetrics) AddProviderResponse(providerName string, id string, errorCode types.ErrorCode)

AddProviderResponse provides a mock function with given fields: providerName, id, errorCode

func (*APIMetrics) AddRPCStatusCode

func (_m *APIMetrics) AddRPCStatusCode(providerName string, endpoint string, code metrics.RPCCode)

AddRPCStatusCode provides a mock function with given fields: providerName, endpoint, code

func (*APIMetrics) ObserveProviderResponseLatency

func (_m *APIMetrics) ObserveProviderResponseLatency(providerName string, endpoint string, duration time.Duration)

ObserveProviderResponseLatency provides a mock function with given fields: providerName, endpoint, duration

Jump to

Keyboard shortcuts

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