ginprom

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 License: Apache-2.0 Imports: 3 Imported by: 1

README

A prometheus instrument middleware for gin inspire by go-grpc-prometheus

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultInstrument = NewInstrument()

Functions

func WithMetrics

func WithMetrics(path string, handler gin.HandlerFunc) gin.HandlerFunc

Types

type Instrument

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

func NewInstrument

func NewInstrument() *Instrument

func (*Instrument) Collect

func (i *Instrument) Collect(ch chan<- prom.Metric)

func (*Instrument) Describe

func (i *Instrument) Describe(ch chan<- *prom.Desc)

func (*Instrument) WithMetrics

func (i *Instrument) WithMetrics(path string, handler gin.HandlerFunc) gin.HandlerFunc

Jump to

Keyboard shortcuts

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