Documentation
¶
Index ¶
- type Encoder
- func NewEncodeKafka(opMetrics *operational.Metrics, params config.StageParam) (Encoder, error)
- func NewEncodeNone() (Encoder, error)
- func NewEncodeProm(opMetrics *operational.Metrics, params config.StageParam) (Encoder, error)
- func NewEncodeS3(opMetrics *operational.Metrics, params config.StageParam) (Encoder, error)
- type MetricsCommonInterface
- type MetricsCommonStruct
- func (m *MetricsCommonStruct) AddAggHist(name string, g interface{}, info *metrics.Preprocessed)
- func (m *MetricsCommonStruct) AddCounter(name string, g interface{}, info *metrics.Preprocessed)
- func (m *MetricsCommonStruct) AddGauge(name string, g interface{}, info *metrics.Preprocessed)
- func (m *MetricsCommonStruct) AddHist(name string, g interface{}, info *metrics.Preprocessed)
- func (m *MetricsCommonStruct) MetricCommonEncode(mci MetricsCommonInterface, metricRecord config.GenericMap)
- type Prometheus
- func (e *Prometheus) Cleanup(cleanupFunc interface{})
- func (e *Prometheus) Encode(metricRecord config.GenericMap)
- func (e *Prometheus) Gatherer() prometheus.Gatherer
- func (e *Prometheus) GetCacheEntry(entryLabels map[string]string, m interface{}) interface{}
- func (e *Prometheus) ProcessAggHist(m interface{}, _ string, labels map[string]string, values []float64) error
- func (e *Prometheus) ProcessCounter(m interface{}, _ string, labels map[string]string, value float64) error
- func (e *Prometheus) ProcessGauge(m interface{}, _ string, labels map[string]string, value float64, _ []string) error
- func (e *Prometheus) ProcessHist(m interface{}, _ string, labels map[string]string, value float64) error
- func (e *Prometheus) Update(config config.StageParam)
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 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 (*Prometheus) ProcessCounter ¶
func (*Prometheus) ProcessGauge ¶
func (*Prometheus) ProcessHist ¶
func (*Prometheus) Update ¶
func (e *Prometheus) Update(config config.StageParam)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.