relabel

package
v1.101.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRelabelConfig added in v1.90.0

func CheckRelabelConfig() error

CheckRelabelConfig checks config pointed by -relabelConfig

func HasRelabeling

func HasRelabeling() bool

HasRelabeling returns true if there is global relabeling.

func Init

func Init()

Init must be called after flag.Parse and before using the relabel package.

Types

type Ctx

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

Ctx holds relabeling context.

func (*Ctx) ApplyRelabeling

func (ctx *Ctx) ApplyRelabeling(labels []prompb.Label) []prompb.Label

ApplyRelabeling applies relabeling to the given labels and returns the result.

The returned labels are valid until the next call to ApplyRelabeling.

func (*Ctx) Reset

func (ctx *Ctx) Reset()

Reset resets ctx.

Jump to

Keyboard shortcuts

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