collector

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationPrefix = "annotations_exporter_"
)

Variables

This section is empty.

Functions

func ConcatMultipleSlices

func ConcatMultipleSlices(slices [][]string) []string

Types

type ConstMetricCollector

type ConstMetricCollector interface {
	Describe(chan<- *prometheus.Desc)
	Collect(chan<- prometheus.Metric)
	Store(Sample)
	Clear(Sample)
}

type GaugeCollector

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

func NewConstGaugeCollector

func NewConstGaugeCollector(mapping Mapping) *GaugeCollector

func (*GaugeCollector) Clear

func (c *GaugeCollector) Clear(sample Sample)

func (*GaugeCollector) Collect

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

func (*GaugeCollector) Describe

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

func (*GaugeCollector) Store

func (c *GaugeCollector) Store(sample Sample)

type Mapping

type Mapping struct {
	Name string `yaml:"name"`
	Help string `yaml:"help,omitempty"`

	ReferenceAnnotations []string `yaml:"reference_annotations"`
	ReferenceLabels      []string `yaml:"reference_labels"`

	KubeResourceMeta []string `yaml:"resource_meta"`
	KubeAnnotations  []string `yaml:"kube_labels,omitempty"`
	KubeLabels       []string `yaml:"kube_annotations,omitempty"`

	MaxRevisions int `yaml:"max_revisions,omitempty"`

	OnlyLabelsAndAnnotations bool `yaml:"only_labels_and_annotations,omitempty"`
}

type MetricsVault

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

func NewVault

func NewVault() *MetricsVault

func (*MetricsVault) Clear

func (v *MetricsVault) Clear(index string, sample Sample)

func (*MetricsVault) RegisterMappings

func (v *MetricsVault) RegisterMappings(mappings []Mapping) error

func (*MetricsVault) Store

func (v *MetricsVault) Store(index string, sample Sample)

type ResourceGaugeMetric

type ResourceGaugeMetric struct {
	RevisionMetrics []RevisionGaugeMetric
}

type RevisionGaugeMetric

type RevisionGaugeMetric struct {
	RevisionValue float64
	LabelValues   []string
}

type Sample

type Sample struct {
	ResourceLabels      map[string]string
	ResourceAnnotations map[string]string
	ResourceMeta        []string
}

Jump to

Keyboard shortcuts

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