metrics

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package metrics is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics interface {
	metric.APIInterceptor

	IncTxRefreshes()
	IncTxRefreshHits()
	IncTxRefreshMisses()

	// MarkBlockAccepted updates all metrics relating to the acceptance of a
	// block, including the underlying acceptance of the contained transactions.
	MarkBlockAccepted(b block.Block) error
	// MarkTxAccepted updates all metrics relating to the acceptance of a
	// transaction.
	//
	// Note: This is not intended to be called during the acceptance of a block,
	// as MarkBlockAccepted already handles updating transaction related
	// metrics.
	MarkTxAccepted(tx *txs.Tx) error
}

func New

func New(
	namespace string,
	registerer prometheus.Registerer,
) (Metrics, error)

type MockMetrics

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

MockMetrics is a mock of Metrics interface.

func NewMockMetrics

func NewMockMetrics(ctrl *gomock.Controller) *MockMetrics

NewMockMetrics creates a new mock instance.

func (*MockMetrics) AfterRequest

func (m *MockMetrics) AfterRequest(arg0 *rpc.RequestInfo)

AfterRequest mocks base method.

func (*MockMetrics) EXPECT

func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder

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

func (*MockMetrics) IncTxRefreshHits

func (m *MockMetrics) IncTxRefreshHits()

IncTxRefreshHits mocks base method.

func (*MockMetrics) IncTxRefreshMisses

func (m *MockMetrics) IncTxRefreshMisses()

IncTxRefreshMisses mocks base method.

func (*MockMetrics) IncTxRefreshes

func (m *MockMetrics) IncTxRefreshes()

IncTxRefreshes mocks base method.

func (*MockMetrics) InterceptRequest

func (m *MockMetrics) InterceptRequest(arg0 *rpc.RequestInfo) *http.Request

InterceptRequest mocks base method.

func (*MockMetrics) MarkBlockAccepted

func (m *MockMetrics) MarkBlockAccepted(arg0 block.Block) error

MarkBlockAccepted mocks base method.

func (*MockMetrics) MarkTxAccepted

func (m *MockMetrics) MarkTxAccepted(arg0 *txs.Tx) error

MarkTxAccepted mocks base method.

type MockMetricsMockRecorder

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

MockMetricsMockRecorder is the mock recorder for MockMetrics.

func (*MockMetricsMockRecorder) AfterRequest

func (mr *MockMetricsMockRecorder) AfterRequest(arg0 any) *gomock.Call

AfterRequest indicates an expected call of AfterRequest.

func (*MockMetricsMockRecorder) IncTxRefreshHits

func (mr *MockMetricsMockRecorder) IncTxRefreshHits() *gomock.Call

IncTxRefreshHits indicates an expected call of IncTxRefreshHits.

func (*MockMetricsMockRecorder) IncTxRefreshMisses

func (mr *MockMetricsMockRecorder) IncTxRefreshMisses() *gomock.Call

IncTxRefreshMisses indicates an expected call of IncTxRefreshMisses.

func (*MockMetricsMockRecorder) IncTxRefreshes

func (mr *MockMetricsMockRecorder) IncTxRefreshes() *gomock.Call

IncTxRefreshes indicates an expected call of IncTxRefreshes.

func (*MockMetricsMockRecorder) InterceptRequest

func (mr *MockMetricsMockRecorder) InterceptRequest(arg0 any) *gomock.Call

InterceptRequest indicates an expected call of InterceptRequest.

func (*MockMetricsMockRecorder) MarkBlockAccepted

func (mr *MockMetricsMockRecorder) MarkBlockAccepted(arg0 any) *gomock.Call

MarkBlockAccepted indicates an expected call of MarkBlockAccepted.

func (*MockMetricsMockRecorder) MarkTxAccepted

func (mr *MockMetricsMockRecorder) MarkTxAccepted(arg0 any) *gomock.Call

MarkTxAccepted indicates an expected call of MarkTxAccepted.

Jump to

Keyboard shortcuts

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