lazycollector

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

Collector is a lazy Prometheus collector. The zero value is ready for use.

func New

func New() *Collector

New returns a new lazy Prometheus collector.

func (*Collector) Collect

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

Collect implements prometheus.Collector. If the inner collector is set, its Collect method is called. Otherwise, Collect is a no-op.

func (*Collector) Describe

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

Describe implements prometheus.Collector. Because Collector is a lazycollector, it is unchecked, so Describe is a no-op.

func (*Collector) Set

func (c *Collector) Set(inner prometheus.Collector)

Set updates the inner collector used by the lazy collector.

Jump to

Keyboard shortcuts

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