promwrap

package
v0.0.0-...-681de73 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// Gauge ...
	Gauge
	// GaugeVec ...
	GaugeVec
	// Counter ...
	Counter
	// CounterVec ...
	CounterVec
)

Variables

View Source
var (
	// ErrCastType ...
	ErrCastType = errors.New("cast type")
	// ErrOperationNotImplemented ...
	ErrOperationNotImplemented = errors.New("operation not implemented")
	// ErrMetricNotExist ...
	ErrMetricNotExist = errors.New("metric not exist")
)

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Register(kind int, name, help string, opts ...string) error
	Add(name string, opts ...interface{}) error
	Set(name string, opts ...interface{}) error
	Inc(name string, opts ...interface{}) error
	Dec(name string, opts ...interface{}) error
}

Interface ...

type Prom

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

Prom ...

func NewProm

func NewProm(port, path string) *Prom

NewProm ...

func (*Prom) Add

func (s *Prom) Add(name string, opts ...interface{}) error

Add ... Gauge, Counter: opts[0] = float64 GaugeVec, CounterVec: []opts = float64 and strings

func (*Prom) Dec

func (s *Prom) Dec(name string, opts ...interface{}) error

Dec ... Gauge: []opts = nil GaugeVec: []opts strings

func (*Prom) Inc

func (s *Prom) Inc(name string, opts ...interface{}) error

Inc ... Gauge, Counter: []opts = nil GaugeVec, CounterVec: []opts strings

func (*Prom) Register

func (s *Prom) Register(kind int, name, help string, opts ...string) error

Register ...

func (*Prom) Set

func (s *Prom) Set(name string, opts ...interface{}) error

Set ... Gauge: opts[0] = float64 GaugeVec: []opts float64 and strings

func (*Prom) Start

func (s *Prom) Start() error

Start ...

Jump to

Keyboard shortcuts

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