Documentation
¶
Index ¶
Constants ¶
View Source
const MaxWindowSize = 100
MaxWindowSize is the upper bound for WindowSize.
View Source
const SetWindow = "window"
SetWindow is the set name for window storage.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Request ¶
type Request struct {
Name string // variable name
Namespace string // FrogoDB namespace
Ref string // source key for entity reference
GroupBy []string // grouping fields
Value string // source key for numeric value
WindowSize int // last N events (max 100)
Fields queries.Field // which functions to compute
PercentileP float64 // for percentile (0-1)
EventID string // current event ID (for dedup)
TTL time.Duration // REQUIRED. Expiration for window records.
IncludeCurrent bool
}
Request describes a sliding window aggregation query.
type Result ¶
type Result struct {
Count int64
Sum float64
Min float64
Max float64
Avg float64
STD float64
Percentile float64
Values []float64 // the raw window values (for debugging)
}
Result holds the outcome of a sliding window aggregation.
Click to show internal directories.
Click to hide internal directories.