metrics

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

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

Jump to

Keyboard shortcuts

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