Offsets on the wire, in the official server's format and accounting, so that offsets stay valid for streams migrated from it.
A token is "0000000000000000_" <> byte_offset zero-padded to 16 decimal
digits. Each stored message advances the offset by 4 + byte_size(message),
the official file store's framing (a 4-byte length prefix), although the
prefix is not stored here.
Summary
Functions
The offset after a message of size bytes stored at offset.
The token for byte_offset.
Parses a client offset. "-1" (and an absent offset, nil or "") is
:start, the earliest data the stream still has (after a trim, not 0);
"now" is :now.
Types
@type t() :: non_neg_integer()
Functions
@spec advance(t(), non_neg_integer()) :: t()
The offset after a message of size bytes stored at offset.
The token for byte_offset.
Parses a client offset. "-1" (and an absent offset, nil or "") is
:start, the earliest data the stream still has (after a trim, not 0);
"now" is :now.