collector

package
v2.0.0-...-1d51050 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBorgCollector

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

Types

type BorgCollector

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

func (BorgCollector) Collect

func (bc BorgCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (BorgCollector) Describe

func (bc BorgCollector) 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.

type CollectorConfig

type CollectorConfig struct {
	Logger log.Logger
}

Jump to

Keyboard shortcuts

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