metrics

package
v4.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleFunc

func HandleFunc(r Var, lg *zap.Logger) http.HandlerFunc

Types

type Counter

type Counter struct {
	metrics.Counter
}

func NewCounter

func NewCounter() *Counter

func (*Counter) Publish

func (c *Counter) Publish() interface{}

type Gauge

type Gauge struct {
	metrics.Gauge
}

func NewGauge

func NewGauge() *Gauge

func (*Gauge) Publish

func (g *Gauge) Publish() interface{}

type GaugeFunc

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

func NewGaugeFunc

func NewGaugeFunc(f func() int64) *GaugeFunc

func (*GaugeFunc) Publish

func (gf *GaugeFunc) Publish() interface{}

type Histogram

type Histogram struct {
	metrics.Histogram
}

func NewHistogram

func NewHistogram(reservoirSize int) *Histogram

func (*Histogram) Publish

func (h *Histogram) Publish() interface{}

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Get

func (r *Registry) Get(name string) Var

func (*Registry) GetOrSet

func (r *Registry) GetOrSet(name string, f func() Var) Var

func (*Registry) Publish

func (r *Registry) Publish() interface{}

func (*Registry) Set

func (r *Registry) Set(name string, v Var)

type Var

type Var interface {
	// Publish should return a build-in type or a map[string]interface{}
	// of build-in types.
	Publish() interface{}
}

Jump to

Keyboard shortcuts

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