metrics

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) gee.Handler

New is middleware server-side metrics.

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 Option

type Option func(*options)

Option is metrics option.

func WithRequests

func WithRequests(c Counter) Option

WithRequests with requests counter.

func WithSeconds

func WithSeconds(c Observer) Option

WithSeconds with seconds histogram.

Jump to

Keyboard shortcuts

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