collector_breaker

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 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 CBCollector

type CBCollector struct {
	Collector
	// contains filtered or unexported fields
}

func New

func New(name string, c Collector, logger *slog.Logger) *CBCollector

func NewWithConfiguration

func NewWithConfiguration(c Collector, cfg breaker.Configuration, logger *slog.Logger) *CBCollector

func (*CBCollector) Collect

func (c *CBCollector) Collect(ch chan<- prometheus.Metric)

func (*CBCollector) Describe

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

type Collector

type Collector interface {
	Describe(ch chan<- *prometheus.Desc)
	CollectE(ch chan<- prometheus.Metric) error
}

type PassThroughCollector

type PassThroughCollector struct {
	Collector
}

PassThroughCollector implements the prometheus Collector interface and passes the Collect call through to a collector_breaker.Collector's CollectE method. It's used for unit testing a collector_breaker.Collector without getting the prometheus metrics.

func (PassThroughCollector) Collect

func (p PassThroughCollector) Collect(metrics chan<- prometheus.Metric)

Jump to

Keyboard shortcuts

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