metric

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GerHttpRouter

func GerHttpRouter() *fasthttprouter.Router

func GetRegistry

func GetRegistry() metrics.Registry

func InitCollectors

func InitCollectors(newMetricConfig structure.MetricConfiguration,
	oldMetricConfig structure.MetricConfiguration) metrics.Registry

func InitGCMetrics

func InitGCMetrics(duration time.Duration)

func InitHealhcheck

func InitHealhcheck(name string, checker func(h metrics.Healthcheck))

func InitHttpServer

func InitHttpServer(metricConfig structure.MetricConfiguration)

func InitMemoryMetrics

func InitMemoryMetrics(duration time.Duration)

func InitStatusChecker

func InitStatusChecker(name string, checker func() interface{})

func RemoveAllStatusChecker

func RemoveAllStatusChecker()

func RemoveStatusChecker

func RemoveStatusChecker(name string)

func WithMetrics added in v1.2.2

func WithMetrics(metrics *MethodMetrics, next backend.Interceptor) backend.Interceptor

Types

type MethodMetrics

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

func NewMethodMetrics

func NewMethodMetrics(metricsPrefix string, registry metrics.Registry) *MethodMetrics

func (*MethodMetrics) CatchMetric

func (mm *MethodMetrics) CatchMetric(method string, dur time.Duration, err error)

Jump to

Keyboard shortcuts

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