label

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

type KeyValueGenerator

type KeyValueGenerator struct {
	FieldIndex int
	FieldType  reflect.Type
	LabelName  string
	T          reflect.Type
}

func (*KeyValueGenerator) GenerateFromValue

func (g *KeyValueGenerator) GenerateFromValue(v interface{}) KeyValue

type RecursiveReflector

type RecursiveReflector struct {
	Lr     *Reflector
	Ln     types.LabelNames
	Fields map[int]*RecursiveReflector
	T      reflect.Type
}

type Reflector

type Reflector struct {
	Generators []KeyValueGenerator
	T          reflect.Type
}

LabelReflector uses a struct values to extract Labels

func (*Reflector) LabelsForValue

func (lr *Reflector) LabelsForValue(v interface{}) prometheus.Labels

Jump to

Keyboard shortcuts

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