metrics

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeNode = "metrics"
)

Variables

This section is empty.

Functions

func Deregister

func Deregister(name string)

Deregister 清理配置适配器

func NewBuilder

func NewBuilder() container.StandardBuilder

func Register

func Register(resolver Resover)

Register 注册配置文件适配器

Types

type Counter

type Counter interface {
	With(lvs ...string) Counter
	Inc()
	Add(delta float64)
}

Counter is metrics counter.

type Gauge

type Gauge interface {
	With(lvs ...string) Gauge
	Set(value float64)
	Add(delta float64)
	Sub(delta float64)
}

Gauge is metrics gauge.

type Observer

type Observer interface {
	With(lvs ...string) Observer
	Observe(float64)
}

Observer is metrics observer.

type Provider

type Provider interface {
	Name() string
	Counter() Counter
	Observer() Observer
	Gauge() Gauge
	GetImpl() interface{}
}

type Resover

type Resover interface {
	Name() string
	Resolve(name string, config config.Config) (Provider, error)
}

resover 定义配置文件转换方法

type StandardMetric

type StandardMetric interface {
	GetProvider(name string) (q Provider)
}

StandardMetric

func NewStandardMetric

func NewStandardMetric(c container.Container) StandardMetric

NewStandardMetric

Jump to

Keyboard shortcuts

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