collector

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClimateMetricCollector

func NewClimateMetricCollector(config CollectorConfig) (prometheus.Collector, error)

Types

type ClimateMetricCollector

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

func (ClimateMetricCollector) Collect

func (ghb ClimateMetricCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (ClimateMetricCollector) Describe

func (ghb ClimateMetricCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type Collector

type Collector interface {
	Describe(ch chan<- *prometheus.Desc)
	// Reload configuration, repositories, workflows, etc.
	Reload(context.Context) error
	// Get new metrics and expose them via prometheus registry.
	Update(context.Context, chan<- prometheus.Metric) error
}

Collector is the interface a collector has to implement.

func NewDhtCollector

func NewDhtCollector(config CollectorConfig, ctx context.Context) (Collector, error)

NewOrgActionsCollector returns a new Collector exposing actions billing stats.

type CollectorConfig

type CollectorConfig struct {
	Logger log.Logger
	GPIO   string
}

type DhtCollector

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

func (*DhtCollector) Describe

func (c *DhtCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector.

func (*DhtCollector) Reload

func (c *DhtCollector) Reload(ctx context.Context) error

func (*DhtCollector) Update

func (c *DhtCollector) Update(ctx context.Context, ch chan<- prometheus.Metric) error

Jump to

Keyboard shortcuts

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