collector

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 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() *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, metadata Metadata)

func (*Collector) Version

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

type Device added in v1.3.0

type Device struct {
	Name string
	Type string
}

type Metadata added in v1.3.0

type Metadata struct {
	IP     string
	Device Device
}

Jump to

Keyboard shortcuts

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