metrics

package
v3.1.1 Latest Latest
Warning

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

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

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 added in v3.0.1

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

MockMetrics is a mock of Metrics interface.

func NewMockMetrics added in v3.0.1

func NewMockMetrics(ctrl *gomock.Controller) *MockMetrics

NewMockMetrics creates a new mock instance.

func (*MockMetrics) EXPECT added in v3.0.1

func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder

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

func (*MockMetrics) GetInstanceMetrics added in v3.0.1

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

GetInstanceMetrics mocks base method.

func (*MockMetrics) GetInvokerMetrics added in v3.0.1

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

GetInvokerMetrics mocks base method.

func (*MockMetrics) GetMethodMetrics added in v3.0.1

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

GetMethodMetrics mocks base method.

func (*MockMetrics) SetInstanceMetrics added in v3.0.1

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

SetInstanceMetrics mocks base method.

func (*MockMetrics) SetInvokerMetrics added in v3.0.1

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

SetInvokerMetrics mocks base method.

func (*MockMetrics) SetMethodMetrics added in v3.0.1

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

SetMethodMetrics mocks base method.

type MockMetricsMockRecorder added in v3.0.1

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

MockMetricsMockRecorder is the mock recorder for MockMetrics.

func (*MockMetricsMockRecorder) GetInstanceMetrics added in v3.0.1

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

GetInstanceMetrics indicates an expected call of GetInstanceMetrics.

func (*MockMetricsMockRecorder) GetInvokerMetrics added in v3.0.1

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

GetInvokerMetrics indicates an expected call of GetInvokerMetrics.

func (*MockMetricsMockRecorder) GetMethodMetrics added in v3.0.1

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

GetMethodMetrics indicates an expected call of GetMethodMetrics.

func (*MockMetricsMockRecorder) SetInstanceMetrics added in v3.0.1

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

SetInstanceMetrics indicates an expected call of SetInstanceMetrics.

func (*MockMetricsMockRecorder) SetInvokerMetrics added in v3.0.1

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

SetInvokerMetrics indicates an expected call of SetInvokerMetrics.

func (*MockMetricsMockRecorder) SetMethodMetrics added in v3.0.1

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