metrics

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mock_metrics is a generated GoMock package.

Index

Constants

View Source
const (
	HillClimbing = "hill-climbing"
)

Variables

View Source
var (
	ErrMetricsNotFound = errors.New("metrics not found")
)

Functions

This section is empty.

Types

type Metrics

type Metrics interface {
	// GetMethodMetrics returns method-level metrics, the format of key is "{instance key}.{invoker key}.{method key}.{key}"
	// url is invoker's url, which contains information about instance and invoker.
	// methodName is the method name.
	// key is the key of the metrics.
	GetMethodMetrics(url *common.URL, methodName, key string) (interface{}, error)
	SetMethodMetrics(url *common.URL, methodName, key string, value interface{}) error

	// GetInvokerMetrics returns invoker-level metrics, the format of key is "{instance key}.{invoker key}.{key}"
	// DO NOT IMPLEMENT FOR EARLIER VERSION
	GetInvokerMetrics(url *common.URL, key string) (interface{}, error)
	SetInvokerMetrics(url *common.URL, key string, value interface{}) error

	// GetInstanceMetrics returns instance-level metrics, the format of key is "{instance key}.{key}"
	// DO NOT IMPLEMENT FOR EARLIER VERSION
	GetInstanceMetrics(url *common.URL, key string) (interface{}, error)
	SetInstanceMetrics(url *common.URL, key string, value interface{}) error
}
var LocalMetrics Metrics

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) EXPECT

func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder

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

func (*MockMetrics) GetInstanceMetrics

func (m *MockMetrics) GetInstanceMetrics(url *common.URL, key string) (interface{}, error)

GetInstanceMetrics mocks base method.

func (*MockMetrics) GetInvokerMetrics

func (m *MockMetrics) GetInvokerMetrics(url *common.URL, key string) (interface{}, error)

GetInvokerMetrics mocks base method.

func (*MockMetrics) GetMethodMetrics

func (m *MockMetrics) GetMethodMetrics(url *common.URL, methodName, key string) (interface{}, error)

GetMethodMetrics mocks base method.

func (*MockMetrics) SetInstanceMetrics

func (m *MockMetrics) SetInstanceMetrics(url *common.URL, key string, value interface{}) error

SetInstanceMetrics mocks base method.

func (*MockMetrics) SetInvokerMetrics

func (m *MockMetrics) SetInvokerMetrics(url *common.URL, key string, value interface{}) error

SetInvokerMetrics mocks base method.

func (*MockMetrics) SetMethodMetrics

func (m *MockMetrics) SetMethodMetrics(url *common.URL, methodName, key string, value interface{}) error

SetMethodMetrics mocks base method.

type MockMetricsMockRecorder

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

MockMetricsMockRecorder is the mock recorder for MockMetrics.

func (*MockMetricsMockRecorder) GetInstanceMetrics

func (mr *MockMetricsMockRecorder) GetInstanceMetrics(url, key interface{}) *gomock.Call

GetInstanceMetrics indicates an expected call of GetInstanceMetrics.

func (*MockMetricsMockRecorder) GetInvokerMetrics

func (mr *MockMetricsMockRecorder) GetInvokerMetrics(url, key interface{}) *gomock.Call

GetInvokerMetrics indicates an expected call of GetInvokerMetrics.

func (*MockMetricsMockRecorder) GetMethodMetrics

func (mr *MockMetricsMockRecorder) GetMethodMetrics(url, methodName, key interface{}) *gomock.Call

GetMethodMetrics indicates an expected call of GetMethodMetrics.

func (*MockMetricsMockRecorder) SetInstanceMetrics

func (mr *MockMetricsMockRecorder) SetInstanceMetrics(url, key, value interface{}) *gomock.Call

SetInstanceMetrics indicates an expected call of SetInstanceMetrics.

func (*MockMetricsMockRecorder) SetInvokerMetrics

func (mr *MockMetricsMockRecorder) SetInvokerMetrics(url, key, value interface{}) *gomock.Call

SetInvokerMetrics indicates an expected call of SetInvokerMetrics.

func (*MockMetricsMockRecorder) SetMethodMetrics

func (mr *MockMetricsMockRecorder) SetMethodMetrics(url, methodName, key, value interface{}) *gomock.Call

SetMethodMetrics indicates an expected call of SetMethodMetrics.

Jump to

Keyboard shortcuts

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