prometheus

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FQN

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

FQN is a name formatter.

func NewFQN

func NewFQN() *FQN

NewFQN returns an FQN formatter.

func (*FQN) Format

func (f *FQN) Format(name string) string

Format formats a name to be a fully qualified name.

type Prometheus

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

Prometheus is a prometheus stats collector.

func New

func New(prefix string) *Prometheus

New returns a new prometheus stats instance.

func (*Prometheus) Close

func (s *Prometheus) Close() error

Close closes the client and flushes buffered stats, if applicable

func (*Prometheus) Dec

func (s *Prometheus) Dec(name string, value int64, rate float32, tags ...string) error

Dec decrements a count by the value.

func (*Prometheus) Gauge

func (s *Prometheus) Gauge(name string, value float64, rate float32, tags ...string) error

Gauge measures the value of a metric.

func (*Prometheus) Handler

func (s *Prometheus) Handler() http.Handler

Handler gets the prometheus HTTP handler.

func (*Prometheus) Inc

func (s *Prometheus) Inc(name string, value int64, rate float32, tags ...string) error

Inc increments a count by the value.

func (*Prometheus) Timing

func (s *Prometheus) Timing(name string, value time.Duration, rate float32, tags ...string) error

Timing sends the value of a Duration.

Jump to

Keyboard shortcuts

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