exporter

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter collects stats from the Tankerkoenig API and exports them using the prometheus client library.

func NewForLocation

func NewForLocation(logger *log.Logger, apiClient *client.Client, location string, radius int) (*Exporter, error)

NewForLocation returns a new, initialized Tankerkoenig API exporter for the stations that are in the given radius around the given location.

func NewForStations

func NewForStations(logger *log.Logger, apiClient *client.Client, apiStations []string) (*Exporter, error)

NewForStations returns a new, initialized Tankerkoenig API exporter for the given stations.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect the stats from the Tankerkoenig API. Implements prometheus.Collector.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe all the metrics collected by the Tankerkoenig exporter. Implements prometheus.Collector.

Jump to

Keyboard shortcuts

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