metrics

package
v0.6.992 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package metrics provides what in prometheus terms is called a metrics exporter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter added in v0.6.94

type Exporter struct {
}

Exporter can be used to both capture and serve metrics.

func (*Exporter) IncSelectedSource added in v0.6.94

func (exp *Exporter) IncSelectedSource(labels map[string]string)

INcSelectedSource is used to update the number of times a source was chosen.

func (*Exporter) SendDataFlow added in v0.6.94

func (exp *Exporter) SendDataFlow(labels map[string]string, data *source.DataFlow)

SendDataFlow can be used to update the metrics exported by the broker about network usage, in particular upload and download bandwidth. `data` Type should either be "read" or "write", referring respectively to download and upload operations.

func (*Exporter) ServeHTTP added in v0.6.94

func (exp *Exporter) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP is just a wrapper around the ServeHTTP function of the prohttp default Handler.

Jump to

Keyboard shortcuts

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