encode

package
v1.10.0-community Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	Encode(in config.GenericMap)
	Update(config.StageParam)
}

func NewEncodeKafka

func NewEncodeKafka(opMetrics *operational.Metrics, params config.StageParam) (Encoder, error)

NewEncodeKafka create a new writer to kafka

func NewEncodeNone

func NewEncodeNone() (Encoder, error)

NewEncodeNone create a new encode

func NewEncodeProm

func NewEncodeProm(opMetrics *operational.Metrics, params config.StageParam) (Encoder, error)

func NewEncodeS3 added in v0.1.5

func NewEncodeS3(opMetrics *operational.Metrics, params config.StageParam) (Encoder, error)

NewEncodeS3 creates a new writer to S3

type MetricsCommonInterface

type MetricsCommonInterface interface {
	GetCacheEntry(entryLabels map[string]string, m interface{}) interface{}
	ProcessCounter(m interface{}, name string, labels map[string]string, value float64) error
	ProcessGauge(m interface{}, name string, labels map[string]string, value float64, lvs []string) error
	ProcessHist(m interface{}, name string, labels map[string]string, value float64) error
	ProcessAggHist(m interface{}, name string, labels map[string]string, value []float64) error
}

type MetricsCommonStruct

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

func NewMetricsCommonStruct

func NewMetricsCommonStruct(opMetrics *operational.Metrics, maxCacheEntries int, name string, expiryTime api.Duration, callback putils.CacheCallback) *MetricsCommonStruct

func (*MetricsCommonStruct) AddAggHist

func (m *MetricsCommonStruct) AddAggHist(name string, g interface{}, info *metrics.Preprocessed)

func (*MetricsCommonStruct) AddCounter

func (m *MetricsCommonStruct) AddCounter(name string, g interface{}, info *metrics.Preprocessed)

func (*MetricsCommonStruct) AddGauge

func (m *MetricsCommonStruct) AddGauge(name string, g interface{}, info *metrics.Preprocessed)

func (*MetricsCommonStruct) AddHist

func (m *MetricsCommonStruct) AddHist(name string, g interface{}, info *metrics.Preprocessed)

func (*MetricsCommonStruct) MetricCommonEncode

func (m *MetricsCommonStruct) MetricCommonEncode(mci MetricsCommonInterface, metricRecord config.GenericMap)

type Prometheus

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

func (*Prometheus) Cleanup

func (e *Prometheus) Cleanup(cleanupFunc interface{})

callback function from lru cleanup

func (*Prometheus) Encode

func (e *Prometheus) Encode(metricRecord config.GenericMap)

Encode encodes a metric before being stored; the heavy work is done by the MetricCommonEncode

func (*Prometheus) Gatherer

func (e *Prometheus) Gatherer() prometheus.Gatherer

func (*Prometheus) GetCacheEntry

func (e *Prometheus) GetCacheEntry(entryLabels map[string]string, m interface{}) interface{}

func (*Prometheus) ProcessAggHist

func (e *Prometheus) ProcessAggHist(m interface{}, _ string, labels map[string]string, values []float64) error

func (*Prometheus) ProcessCounter

func (e *Prometheus) ProcessCounter(m interface{}, _ string, labels map[string]string, value float64) error

func (*Prometheus) ProcessGauge

func (e *Prometheus) ProcessGauge(m interface{}, _ string, labels map[string]string, value float64, _ []string) error

func (*Prometheus) ProcessHist

func (e *Prometheus) ProcessHist(m interface{}, _ string, labels map[string]string, value float64) error

func (*Prometheus) Update

func (e *Prometheus) Update(config config.StageParam)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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