collector

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 54

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlreadyRegisteredError

func IsAlreadyRegisteredError(err error) bool

IsAlreadyRegisteredError asserts alreadyRegisteredError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Interface

type Interface interface {
	// Collect should align with the monitoring system's implementation
	// requirements. In this case Prometheus. See also
	// https://godoc.org/github.com/prometheus/client_golang/prometheus#Collector.
	// The difference here is that this specific interface provides additional
	// error handling capabilities.
	Collect(ch chan<- prometheus.Metric) error
	// Describe should align with the monitoring system's implementation
	// requirements. In this case Prometheus. See also
	// https://godoc.org/github.com/prometheus/client_golang/prometheus#Collector.
	// The difference here is that this specific interface provides additional
	// error handling capabilities.
	Describe(ch chan<- *prometheus.Desc) error
}

Interface defines how a collector implementation should look like.

type Set

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

func NewSet

func NewSet(config SetConfig) (*Set, error)

func (*Set) Boot

func (s *Set) Boot(ctx context.Context) error

func (*Set) Collect

func (s *Set) Collect(ch chan<- prometheus.Metric)

func (*Set) Describe

func (s *Set) Describe(ch chan<- *prometheus.Desc)

func (*Set) Stop added in v0.2.1

func (s *Set) Stop(ctx context.Context)

type SetConfig

type SetConfig struct {
	Collectors []Interface
	Logger     micrologger.Logger
}

Jump to

Keyboard shortcuts

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