exporter

package
v0.0.0-...-a4c4f0e Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter collects power stats from the given serial device connected to a Delta Solivia inverter and exports them using the prometheus metrics package.

func New

func New(opts SerialOpts, logger log.Logger) (*Exporter, error)

New returns an initialized Exporter.

func (*Exporter) Collect

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

Collect fetches the stats from configured inverter and delivers them as Prometheus metrics. It implements prometheus.Collector.

func (*Exporter) Describe

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

Describe describes all the metrics ever exported by the Delta Solivia exporter. It implements prometheus.Collector.

type SerialOpts

type SerialOpts struct {
	Address      string
	BaudRate     int
	Timeout      time.Duration
	Insecure     bool
	RequestLimit int
}

SerialOpts configures options for connecting to serial device connected to inverter.

Jump to

Keyboard shortcuts

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