collectors

package
v0.0.0-...-b17ab72 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 3 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 {
	Settings *Settings
	Logger   *slog.Logger
	// contains filtered or unexported fields
}

func NewExporter

func NewExporter(s *Settings, logger *slog.Logger) (*Exporter, error)

Initializes the exporter

func (*Exporter) Collect

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

Collects metrics configured and returns them as prometheus metrics implements prometheus.Collector

func (*Exporter) Describe

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

Describes all metrics implements prometheus.Collector.

type Settings

type Settings struct {
	LogLevel    string
	LogFormat   string
	MetricsPath string
	ListenPort  string
	Address     string
}

exporter settings, more settings can be added if needed

Jump to

Keyboard shortcuts

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