tags

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Graphite

func Graphite(config TagConfig, s string) (string, error)

func GraphiteBuffered added in v0.11.4

func GraphiteBuffered(config TagConfig, s string, tagBuf *GraphiteBuf) (string, error)

func Prometheus

func Prometheus(labels []*prompb.Label) (string, error)

Types

type GraphiteBuf added in v0.11.4

type GraphiteBuf struct {
	KV KVSlice
	B  stringutils.Builder
}

func (*GraphiteBuf) Resize added in v0.11.4

func (b *GraphiteBuf) Resize(kvLen, builderLen int)

func (*GraphiteBuf) ResizeBuilder added in v0.11.4

func (b *GraphiteBuf) ResizeBuilder(builderLen int)

func (*GraphiteBuf) ResizeKV added in v0.11.4

func (b *GraphiteBuf) ResizeKV(kvLen int)

type KVSlice added in v0.11.4

type KVSlice []kv

func (KVSlice) Len added in v0.11.4

func (a KVSlice) Len() int

func (KVSlice) Less added in v0.11.4

func (a KVSlice) Less(i, j int) bool

func (KVSlice) Swap added in v0.11.4

func (a KVSlice) Swap(i, j int)

type TagConfig added in v0.10.0

type TagConfig struct {
	Enabled       bool              `toml:"enabled"`
	Separator     string            `toml:"separator"`
	Tags          []string          `toml:"tags"`
	TagMap        map[string]string `toml:"-"`
	Templates     []string          `toml:"templates"`
	TemplateDescs []TemplateDesc    `toml:"-"`
}

func DisabledTagConfig added in v0.10.0

func DisabledTagConfig() TagConfig

func (*TagConfig) Configure added in v0.10.0

func (cfg *TagConfig) Configure() error

type TemplateDesc added in v0.10.0

type TemplateDesc struct {
	Filter    *regexp.Regexp
	Template  []string
	ExtraTags map[string]string
}

Jump to

Keyboard shortcuts

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