exporter

package
v0.0.0-...-8c5b625 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(devices *[]Device, logger *slog.Logger) prometheus.Collector

Types

type Device

type Device struct {
	Name    string
	Id      string
	Key     string
	Ip      string
	Timeout *time.Duration
}

func (Device) GetTimeout

func (d Device) GetTimeout() time.Duration

type DeviceMetrics

type DeviceMetrics struct {
	ScrapeDuration *prometheus.SummaryVec
	ScrapeErrors   *prometheus.CounterVec
	Current        *prometheus.GaugeVec
	Voltage        *prometheus.GaugeVec
	Power          *prometheus.GaugeVec
	SwitchOn       *prometheus.GaugeVec
}

type GlobalMetrics

type GlobalMetrics struct {
	TotalScrapes prometheus.Summary
	Error        prometheus.Gauge
}

type PlugInfo

type PlugInfo struct {
	Voltage float64
	Power   float64
	Current float64
	On      float64
}

Jump to

Keyboard shortcuts

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