collector

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsNamespace = "etcd_kubernetes"
)

Variables

This section is empty.

Functions

func IsEmptyLine

func IsEmptyLine(err error) bool

IsEmptyLine asserts emptyLineError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Etcd

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

func NewEtcd

func NewEtcd(config EtcdConfig) (*Etcd, error)

NewEtcd exposes metrics about the number of k8s resources stored in etcd.

func (*Etcd) Collect

func (d *Etcd) Collect(ch chan<- prometheus.Metric) error

func (*Etcd) Describe

func (d *Etcd) Describe(ch chan<- *prometheus.Desc) error

type EtcdConfig

type EtcdConfig struct {
	Logger           micrologger.Logger
	EtcdClientConfig *clientv3.Config
	EtcdPrefix       string
}

type EventsCollector added in v0.4.0

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

func NewEventsCollector added in v0.4.0

func NewEventsCollector(config EventsCollectorConfig) (*EventsCollector, error)

func (*EventsCollector) Collect added in v0.4.0

func (d *EventsCollector) Collect(ch chan<- prometheus.Metric) error

func (*EventsCollector) Describe added in v0.4.0

func (d *EventsCollector) Describe(ch chan<- *prometheus.Desc) error

type EventsCollectorConfig added in v0.4.0

type EventsCollectorConfig struct {
	Logger           micrologger.Logger
	EtcdClientConfig *clientv3.Config
	EventsPrefix     string
}

type Set

type Set struct {
	*collector.Set
}

Set is basically only a wrapper for the operator's collector implementations. It eases the iniitialization and prevents some weird import mess so we do not have to alias packages.

func NewSet

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

type SetConfig

type SetConfig struct {
	Logger           micrologger.Logger
	EtcdClientConfig *clientv3.Config
	EtcdPrefix       string
	EventsPrefix     string
}

Jump to

Keyboard shortcuts

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