tsdb

package
v0.0.8-beta Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

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

Aggregator manages in-memory tumbling windows for metrics.

func NewAggregator

func NewAggregator(repo *storage.Repository, windowSize time.Duration) *Aggregator

NewAggregator creates a new TSDB aggregator.

func (*Aggregator) Ingest

func (a *Aggregator) Ingest(m RawMetric)

Ingest adds a raw metric point to the current aggregator window.

func (*Aggregator) Start

func (a *Aggregator) Start(ctx context.Context)

Start begins the aggregation background processes.

func (*Aggregator) Stop

func (a *Aggregator) Stop()

Stop stops the aggregator.

type RawMetric

type RawMetric struct {
	Name        string
	ServiceName string
	Value       float64
	Timestamp   time.Time
	Attributes  map[string]interface{}
}

RawMetric represents an incoming single metric data point before aggregation.

Jump to

Keyboard shortcuts

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