collector

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collectors

type Collectors struct {
	Rlr              *label.RecursiveReflector
	StaticCollectors []GeneratedUpdator

	Maps []DynamicMap
	T    reflect.Type
	// contains filtered or unexported fields
}

func (*Collectors) Collect

func (u *Collectors) Collect(c chan<- prometheus.Metric)

func (*Collectors) Describe

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

func (*Collectors) Fill

func (u *Collectors) Fill(t reflect.Type, rlr *label.RecursiveReflector, parent string, metricNameTransform types.MetricNameTransformer)

type DynamicMap

type DynamicMap struct {
	IndexInStruct int
	StructParent  string
	FieldName     string // Field names get saved in snake cased prometheus format

	Mapped map[reflect.Value]*Collectors
}

type GeneratedUpdator

type GeneratedUpdator struct {
	Collector prometheus.Collector
	Index     int
	Update    func(last, current int64, ls prometheus.Labels) int64
	Last      int64
}

Jump to

Keyboard shortcuts

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