collector

package
v1.2.0-RC6 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace = "tasmota"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	Device              *prometheus.CounterVec
	PowerUsageTotal     *prometheus.GaugeVec
	PowerUsageToday     *prometheus.GaugeVec
	PowerUsageYesterday *prometheus.GaugeVec
	PowerUsageCurrent   *prometheus.GaugeVec
}

func New

func New(deviceName string, ip string, deviceType string) *Collector

func (*Collector) Collect

func (c *Collector) Collect(metrics chan<- prometheus.Metric)

func (*Collector) Describe

func (c *Collector) Describe(descs chan<- *prometheus.Desc)

func (*Collector) SetPowerUsage

func (c *Collector) SetPowerUsage(current, today, yesterday, total float64)

func (*Collector) Version

func (c *Collector) Version(sdk string, version string)

Jump to

Keyboard shortcuts

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