Documentation
¶
Overview ¶
Package prometheus implements an prometheus stats client.
Index ¶
- type FQN
- type Logger
- type Prometheus
- func (s *Prometheus) Close() error
- func (s *Prometheus) Dec(name string, value int64, rate float32, tags ...string)
- func (s *Prometheus) Gauge(name string, value float64, rate float32, tags ...string)
- func (s *Prometheus) Handler() http.Handler
- func (s *Prometheus) Inc(name string, value int64, rate float32, tags ...string)
- func (s *Prometheus) Timing(name string, value time.Duration, rate float32, tags ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶ added in v1.4.0
type Logger interface {
Error(msg string, ctx ...interface{})
}
Logger represents an abstract logging object.
type Prometheus ¶
type Prometheus struct {
// contains filtered or unexported fields
}
Prometheus is a prometheus stats collector.
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)
Dec decrements a count by the value.
func (*Prometheus) Gauge ¶
func (s *Prometheus) Gauge(name string, value float64, rate float32, tags ...string)
Gauge measures the value of a metric.
func (*Prometheus) Handler ¶
func (s *Prometheus) Handler() http.Handler
Handler gets the prometheus HTTP handler.
Click to show internal directories.
Click to hide internal directories.