Skip to main content

Module engine

Module engine 

Source
Expand description

Schema-agnostic windowing state-machine engines.

Each engine owns the per-(group,window) accumulator state, high-water late rejection, eviction, and diff routing (Insert -> add, Update -> remove(pre) + add(post), Remove -> remove(pre)). The caller (the “face”) owns extraction (row -> (group, coord, contribution)) and output construction; it hands the engine pre-bucketed events and receives WindowResults to translate into diffs.

Modules§

config
multi_rolling
rolling
rolling_incremental
tumbling
tumbling_carry

Structs§

EmitKey
GroupMeta
Per-group metadata: the highest window start seen, used to drop late events for already-closed windows.
MetaKey
State-cache key for a group’s GroupMeta, tagged so it lives in a distinct keyspace from the per-window accumulators.
RunningKey
WindowResult
A finalized window the engine produced; the face turns it into a diff.
WindowStateKey

Enums§

AccumulatorEvent
One contribution routed to a window accumulator.
EmitKind
How a finalized window value should be emitted downstream.

Functions§

coord_between_range
coord_due_range
coord_entry_key
coord_row_range
expiry_due_range
expiry_key
is_sealed
meta_key_for
seal_horizon
The seal horizon: window anchors (window start for bucketed engines, the coordinate for rolling ledgers) strictly below this value are sealed - immutable and eligible for state reclamation. Computed by the face as watermark - seal_after, where seal_after folds the window span and the grace duration into one number in coordinate units.