history

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistorySample

type HistorySample struct {
	T  int64   `json:"t"`
	Tx float64 `json:"tx"`
	Av float64 `json:"av"`
	Pk float64 `json:"pk"`
	Dr float64 `json:"dr"`
}

HistorySample is one time-series data point for a single CAKE interface. All numeric values are float64 so they can be directly consumed by charting libraries (uPlot, Chart.js, etc.).

type HistoryStore

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

HistoryStore is a thread-safe collection of per-interface ring buffers.

func NewHistoryStore

func NewHistoryStore(capacity int) *HistoryStore

func (*HistoryStore) Record

func (hs *HistoryStore) Record(stats []types.CakeStats, interval time.Duration)

func (*HistoryStore) Snapshot

func (hs *HistoryStore) Snapshot() map[string][]HistorySample

Jump to

Keyboard shortcuts

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