pkg

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 8 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 is a Prometheus exporter.

func NewExporter

func NewExporter(cfg *ExporterConfig) (*Exporter, error)

NewExporter creates a Prometheus exporter using the ExporterConfig and registers the collectors.

func (*Exporter) Run

func (e *Exporter) Run() error

Run starts the exporter server and listens for incoming scraping requests.

type ExporterConfig

type ExporterConfig struct {
	ListenAddr            *string
	MetricsPath           *string
	Timeout               *int
	NestURL               *string
	NestOAuthClientID     *string
	NestOAuthClientSecret *string
	NestOAuthToken        *oauth2.Token // Only used to mock a dummy token in tests
	NestProjectID         *string
	NestRefreshToken      *string
	WeatherLocation       *string
	WeatherURL            *string
	WeatherToken          *string
}

ExporterConfig contains configuration for the Exporter.

Directories

Path Synopsis
collectors

Jump to

Keyboard shortcuts

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