Meta to tags list and map for sinks (#63)

* Change ccMetric->Influx functions

* Use a meta_as_tags string list in config but create a lookup map afterwards

* Add meta as tag logic to sampleSink
This commit is contained in:
Thomas Gruber
2022-03-15 16:16:26 +01:00
committed by GitHub
parent aa1afd745e
commit 57629a2e0a
8 changed files with 52 additions and 28 deletions

View File

@@ -5,13 +5,13 @@ import (
)
type defaultSinkConfig struct {
MetaAsTags bool `json:"meta_as_tags,omitempty"`
Type string `json:"type"`
MetaAsTags []string `json:"meta_as_tags,omitempty"`
Type string `json:"type"`
}
type sink struct {
meta_as_tags bool // Use meta data tags as tags
name string // Name of the sink
meta_as_tags map[string]bool // Use meta data tags as tags
name string // Name of the sink
}
type Sink interface {