g_metrics

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 4 Imported by: 0

README

v1问题:

  1. 外部用户初始化太费劲,不能一步搞定(主要问题)
  2. 在使用时也要带太多附加信息,不能一步到位

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(name string, label string, value float64)

func CreateCounter

func CreateCounter(name string, help string, label []string)

func CreateGauge

func CreateGauge(name string, help string, label []string)

func EnableMeter

func EnableMeter()

func Set

func Set(name string, label string, value float64)

func Sub

func Sub(name string, label string, value float64)

Types

type PrometheusMetricsServer

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

func NewPrometheusMetricsServer

func NewPrometheusMetricsServer(port int) *PrometheusMetricsServer

This method should be placed at the forefront to ensure that it can be call before other services are registered.

func (*PrometheusMetricsServer) Start

func (p *PrometheusMetricsServer) Start() error

func (*PrometheusMetricsServer) Stop

func (p *PrometheusMetricsServer) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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