collectors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostname

func GetHostname() (string, error)

func GetSensorAltitude

func GetSensorAltitude(sensor *bsbmp.BMP) float32

func GetSensorHumidityRH

func GetSensorHumidityRH(sensor *bsbmp.BMP) float32

func GetSensorPressureMmHg

func GetSensorPressureMmHg(sensor *bsbmp.BMP) float32

func GetSensorPressurePa

func GetSensorPressurePa(sensor *bsbmp.BMP) float32

func GetSensorTemperature

func GetSensorTemperature(sensor *bsbmp.BMP) float32

func InitSensor

func InitSensor() (*bsbmp.BMP, *i2c.I2C)

Types

type BMECollector

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

BMECollector defines the struct for the collector that contains pointers to prometheus descriptors for each metric you wish to expose.

func NewBMECollector

func NewBMECollector() *BMECollector

NewBMECollector is the constructor for every descriptor and returns a pointer to the collector

func (*BMECollector) Collect

func (collector *BMECollector) Collect(ch chan<- prometheus.Metric)

Collect implements required collect function for all prometheus collectors

func (*BMECollector) Describe

func (collector *BMECollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the Describe function of the collector

Jump to

Keyboard shortcuts

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