cache

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatchedMetricsCache

type MatchedMetricsCache struct {
	// map key is the metric name
	Metrics map[string]*Metric
	Mutex   sync.RWMutex
}

type Metric

type Metric struct {
	DataPoint *pmetric.NumberDataPoint
	// contains filtered or unexported fields
}

type MetricCache

type MetricCache struct {
	// map key is the metric group name
	MetricGroups map[string]*MetricGroup
	// contains filtered or unexported fields
}

func GetCache

func GetCache(id string, cacheTtl time.Duration, metricGroups []common.MetricGroup, logger *zap.Logger) MetricCache

type MetricGroup

type MetricGroup struct {
	Mutex sync.RWMutex
	// contains filtered or unexported fields
}

func (*MetricGroup) GetMatchedMetricsCache

func (mg *MetricGroup) GetMatchedMetricsCache(id string) *MatchedMetricsCache

func (*MetricGroup) HasMatchedMetrics

func (mg *MetricGroup) HasMatchedMetrics(id string) bool

func (*MetricGroup) SetMetric

func (mg *MetricGroup) SetMetric(id string, name string, data *pmetric.NumberDataPoint)

Jump to

Keyboard shortcuts

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