prometrics

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inc

func Inc(metricName string, labels Labels)

Increments metric with labels for one

func Register

func Register(
	metricName string,
	labels []string,
	help string,
)

RegisterGauge register and store collector for particular [metricKey, metricName] pair. getter function is used to provide metric value

func RegisterWithCollector

func RegisterWithCollector(
	metricName string,
	labels Labels,
	help string,
	collector func(Labels) float64,
)

RegisterGauge register and store collector for particular [metricKey, metricName] pair. collector function is used to provide metric value

func Unregister

func Unregister(metricName string)

Unregister unregisters metric fo specified name

func UnregisterWithCollector

func UnregisterWithCollector(metricName string, labels Labels)

Unregister unregisters metric fo specified name

Types

type Labels

type Labels prometheus.Labels

Labels is an alias for prometheus.Labels value

type Server

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

Server is a type for metrics server instances

func New

func New() (*Server, error)

New returns new instance of the metrics server

func (*Server) Listen

func (r *Server) Listen() error

Listen starts metrics server

func (*Server) StopListen

func (r *Server) StopListen() error

StopListen stops metrics server

Jump to

Keyboard shortcuts

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