metrics

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCounter

func NewCounter(name string) metrics.Counter

NewCounter create a new metrics Counter

func NewGauge

func NewGauge(name string) metrics.Gauge

NewGauge create a new metrics Gauge

func NewHistogramWithUniformSample

func NewHistogramWithUniformSample(name string, reservoirSize int) metrics.Histogram

NewHistogramWithUniformSample create a new metrics History with Uniform Sample algorithm.

func NewMeter

func NewMeter(name string) metrics.Meter

NewMeter create a new metrics Meter

func NewTimer

func NewTimer(name string) metrics.Timer

NewTimer create a new metrics Timer

func Run

func Run(config *Config, parent goprocess.Process)

Run metrics monitor

Types

type Config

type Config struct {
	Enable   bool     `mapstructure:"enable"`
	Host     string   `mapstructure:"host"`
	Db       string   `mapstructure:"db"`
	User     string   `mapstructure:"user"`
	Password string   `mapstructure:"password"`
	Tags     []string `mapstructure:"tags"`
}

Config for metrics configuration

Jump to

Keyboard shortcuts

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