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§
Structs§
- EmitKey
- Group
Meta - 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. - Running
Key - Window
Result - A finalized window the engine produced; the face turns it into a diff.
- Window
State Key
Enums§
- Accumulator
Event - One contribution routed to a window accumulator.
- Emit
Kind - 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, whereseal_afterfolds the window span and the grace duration into one number in coordinate units.