collector

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	// Gets metrics and sends to the Prometheus.Metric channel.
	Get(ch chan<- prometheus.Metric) (float64, error)
}

Collector is the interface a collector has to implement.

func NewResourceCollector

func NewResourceCollector() Collector

NewResourceCollector returns a new ResourceCollector.

func NewSensorCollector

func NewSensorCollector() Collector

NewSensorCollector returns a new SensorCollector.

func NewVersionCollector added in v0.1.2

func NewVersionCollector() Collector

NewVersionCollector returns a new VersionCollector.

type Exporter added in v0.1.2

type Exporter struct {
	Collectors map[string]Collector
}

Exporter collects all collector metrics, implemented as per the prometheus.Collector interface.

func NewExporter

func NewExporter() *Exporter

NewExporter returns a new Exporter.

func (*Exporter) Collect added in v0.1.2

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

Collect implemented as per the prometheus.Collector interface.

func (*Exporter) Describe added in v0.1.2

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

Describe implemented as per the prometheus.Collector interface.

type ResourceCollector

type ResourceCollector struct{}

ResourceCollector collects resource metrics, implemented as per the Collector interface.

func (*ResourceCollector) Get added in v0.1.2

func (c *ResourceCollector) Get(ch chan<- prometheus.Metric) (float64, error)

Get metrics and send to the Prometheus.Metric channel.

type SensorCollector

type SensorCollector struct{}

SensorCollector collects sensor metrics, implemented as per the Collector interface.

func (*SensorCollector) Get added in v0.1.2

func (c *SensorCollector) Get(ch chan<- prometheus.Metric) (float64, error)

Get metrics and send to the Prometheus.Metric channel.

type VersionCollector added in v0.1.2

type VersionCollector struct{}

VersionCollector collects version metrics, implemented as per the Collector interface.

func (*VersionCollector) Get added in v0.1.2

func (c *VersionCollector) Get(ch chan<- prometheus.Metric) (float64, error)

Get metrics and send to the Prometheus.Metric channel.

Jump to

Keyboard shortcuts

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