Help us shape the future of Go! Take the 2026 Go Developer Survey

metrics

package
v1.16.16 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 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 {
	utilmetric.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(registerer metric.Registerer) (Metrics, error)

type MockMetrics added in v1.1.11

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

MockMetrics is a mock of Metrics interface.

func NewMockMetrics added in v1.1.11

func NewMockMetrics(ctrl *gomock.Controller) *MockMetrics

NewMockMetrics creates a new mock instance.

func (*MockMetrics) AfterRequest added in v1.1.11

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

AfterRequest mocks base method.

func (*MockMetrics) EXPECT added in v1.1.11

func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder

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

func (*MockMetrics) IncTxRefreshHits added in v1.1.11

func (m *MockMetrics) IncTxRefreshHits()

IncTxRefreshHits mocks base method.

func (*MockMetrics) IncTxRefreshMisses added in v1.1.11

func (m *MockMetrics) IncTxRefreshMisses()

IncTxRefreshMisses mocks base method.

func (*MockMetrics) IncTxRefreshes added in v1.1.11

func (m *MockMetrics) IncTxRefreshes()

IncTxRefreshes mocks base method.

func (*MockMetrics) InterceptRequest added in v1.1.11

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

InterceptRequest mocks base method.

func (*MockMetrics) MarkBlockAccepted added in v1.1.11

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

MarkBlockAccepted mocks base method.

func (*MockMetrics) MarkTxAccepted added in v1.1.11

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

MarkTxAccepted mocks base method.

type MockMetricsMockRecorder added in v1.1.11

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

MockMetricsMockRecorder is the mock recorder for MockMetrics.

func (*MockMetricsMockRecorder) AfterRequest added in v1.1.11

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

AfterRequest indicates an expected call of AfterRequest.

func (*MockMetricsMockRecorder) IncTxRefreshHits added in v1.1.11

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

IncTxRefreshHits indicates an expected call of IncTxRefreshHits.

func (*MockMetricsMockRecorder) IncTxRefreshMisses added in v1.1.11

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

IncTxRefreshMisses indicates an expected call of IncTxRefreshMisses.

func (*MockMetricsMockRecorder) IncTxRefreshes added in v1.1.11

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

IncTxRefreshes indicates an expected call of IncTxRefreshes.

func (*MockMetricsMockRecorder) InterceptRequest added in v1.1.11

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

InterceptRequest indicates an expected call of InterceptRequest.

func (*MockMetricsMockRecorder) MarkBlockAccepted added in v1.1.11

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

MarkBlockAccepted indicates an expected call of MarkBlockAccepted.

func (*MockMetricsMockRecorder) MarkTxAccepted added in v1.1.11

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

MarkTxAccepted indicates an expected call of MarkTxAccepted.

Directories

Path Synopsis
Package metricsmock is a generated GoMock package.
Package metricsmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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