aggregation

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultMetricAggregator added in v0.5.0

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

DefaultMetricAggregator is a single implementation for all strategies It always returns both stable and panic values - the algorithm layer decides which to use This is a stateless aggregator that delegates to MetricsClient

func NewMetricAggregator added in v0.5.0

func NewMetricAggregator(client metrics.AggregatorMetricsClient) *DefaultMetricAggregator

NewMetricAggregator creates a metric aggregator (same for all strategies)

func (*DefaultMetricAggregator) GetAggregatedMetrics added in v0.5.0

func (a *DefaultMetricAggregator) GetAggregatedMetrics(key types.MetricKey, now time.Time) (*types.AggregatedMetrics, error)

func (*DefaultMetricAggregator) ProcessSnapshot added in v0.5.0

func (a *DefaultMetricAggregator) ProcessSnapshot(metricKey types.MetricKey, snapshot *types.MetricSnapshot) error

type MetricAggregator added in v0.5.0

type MetricAggregator interface {
	// ProcessSnapshot adds new metrics to aggregation windows
	ProcessSnapshot(metricKey types.MetricKey, snapshot *types.MetricSnapshot) error

	// GetAggregatedMetrics returns processed metrics for scaling decisions
	GetAggregatedMetrics(key types.MetricKey, now time.Time) (*types.AggregatedMetrics, error)
}

MetricAggregator processes and aggregates metrics over time windows

Jump to

Keyboard shortcuts

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