tags

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSeriesByTags added in v0.16.0

func ExtractSeriesByTags(s, defaultName string) map[string]string

parse seriesByTag args

func ExtractTags

func ExtractTags(s string) map[string]string

ExtractTags extracts all graphite-style tags out of metric name E.x. cpu.usage_idle;cpu=cpu-total;host=test => {"name": "cpu.usage_idle", "cpu": "cpu-total", "host": "test"} There are some differences between how we handle tags and how graphite-web can do that. In our case it is possible to have empty value as it doesn't make sense to skip tag in that case but can be potentially useful Also we do not fail on invalid cases, but rather than silently skipping broken tags as some backends might accept invalid tag and store it and one of the purposes of carbonapi is to keep working even if backends gives us slightly broken replies.

Types

type ParseStep added in v0.16.0

type ParseStep int8
const (
	WantTag ParseStep = iota
	WantCmp
	WantDelim
)

Jump to

Keyboard shortcuts

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