Macaw.Data.Source.Detector.Watermark (macaw_data v0.21.1)

View Source

The generic watermark detector (spec/01 §4.5): it watches an adapter implementing Macaw.Data.Source.Detector.Watermarks, one window a watched slot, aligned to the holding's slots, and one an open-ended range, keeping the last watermarks it saw.

A slot whose count or marker moved is a range notice, runs of them merged; a slot seen for the first time is one too, since what was read before its first watermark may already have moved; a slot no longer watched is forgotten. :unknown, or a window the answer lacks, is Change.all/1. A deletion is seen by its slot's count.

Options: name: the source's name the notices carry and axis: the slot axis (a Macaw.Data.Source.Subscriptions), both required; sees: what it observes, :all by default.