prometheus

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "prometheus"

Variables

This section is empty.

Functions

func NewPrometheusExporter

func NewPrometheusExporter(config *configuration.GatewayConfig) exporters.Exporter

func UpdateToMetricNameAndLabels

func UpdateToMetricNameAndLabels(prefix *gnmipb.Path, update *gnmipb.Update) (string, map[string]string)

Types

type DeltaCalculator

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

func NewDeltaCalculator

func NewDeltaCalculator() *DeltaCalculator

func (*DeltaCalculator) Calc

func (d *DeltaCalculator) Calc(hash Hash, newValue float64) (float64, bool)

Calculate the delta for given hash and value. Returns the provided value and false if a previous value didn't exist.

type Hash

type Hash uint64

func NewStringMapHash

func NewStringMapHash(name string, labels map[string]string) Hash

type PrometheusExporter

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

func (*PrometheusExporter) Export

func (e *PrometheusExporter) Export(leaf *ctree.Leaf)

func (*PrometheusExporter) Name added in v0.8.0

func (e *PrometheusExporter) Name() string

func (*PrometheusExporter) Start

func (e *PrometheusExporter) Start(cache *cache.Cache) error

Jump to

Keyboard shortcuts

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