WardrikEvents.Reader (wardrik_events v0.1.0-rc.1)

Copy Markdown

Reads kept events back from the logs patterns match.

Summary

Types

{log, sequence, event}.

Functions

Returns cursor moved past each of entries.

Streams every entry of log, oldest first.

Returns the logs resources match.

Returns up to limit entries of log after the sequence number at.

Returns the cursor at the end of the logs resources match.

Returns up to limit entries after cursor from the logs resources match, oldest first, and the cursor after them.

Types

entry()

{log, sequence, event}.

Functions

advanced(cursor, entries)

Returns cursor moved past each of entries.

all(settings, log)

@spec all(map(), String.t()) :: Enumerable.t(entry())

Streams every entry of log, oldest first.

covered(store, resources)

@spec covered(WardrikStore.t(), [String.t()]) :: [String.t()]

Returns the logs resources match.

entries(settings, log, at, limit)

@spec entries(map(), String.t(), non_neg_integer(), pos_integer()) :: [entry()]

Returns up to limit entries of log after the sequence number at.

If retention dropped the next one, the entries start with a wardrik.events.dropped.

head(store, resources)

Returns the cursor at the end of the logs resources match.

page(settings, resources, cursor, limit)

Returns up to limit entries after cursor from the logs resources match, oldest first, and the cursor after them.