metrics

package
v0.0.0-...-26b160e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

@Time : 2019/5/10 10:16 @Author : kenny zhu @File : options.go @Software: GoLand @Others:

@Time : 2019/5/9 17:56 @Author : kenny zhu @File : prometheus.go @Software: GoLand @Others: gin prometheus process

@Time : 2019/5/10 10:25 @Author : kenny zhu @File : prometheus_rabbitmq.go @Software: GoLand @Others: 参考 https://github.com/kbudde/rabbitmq_exporter 代码实现对整个rabbitmq监控。

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPrometheus gin.HandlerFunc
)

Functions

func InitDefault

func InitDefault(opts ...Option)

func NewGinHandlerWrapper

func NewGinHandlerWrapper(opts ...Option) gin.HandlerFunc

for gin wrapper, support goroutine

Types

type Option

type Option func(o *Options)

func Function

func Function(n map[string]func() float64) Option

func Id

func Id(n string) Option

func MetaData

func MetaData(n map[string]string) Option

func Namespace

func Namespace(n string) Option

func Version

func Version(n string) Option

type Options

type Options struct {
	Namespace string
	Id        string
	Version   string
	MetaData  map[string]string
	Function  map[string]func() float64
}

Jump to

Keyboard shortcuts

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