Skip to main content

Module protocol

Module protocol 

Source

Structs§

LogHeader
Decoded header for one xlog block.
SeqGenerator
Async sequence generator matching Mars xlog semantics.

Enums§

AppendMode
Append path encoded into the xlog magic byte.
CompressionKind
Compression family encoded into the xlog magic byte.
ProtocolError
Errors returned by header decode/mutation helpers.

Constants§

HEADER_CLIENT_PUBKEY_OFFSET
Byte offset of the encoded client public key field.
HEADER_END_HOUR_OFFSET
Byte offset of the encoded end-hour field.
HEADER_LEN
Byte length of one encoded xlog header.
HEADER_LEN_OFFSET
Byte offset of the encoded payload-length field.
MAGIC_ASYNC_NO_CRYPT_ZLIB_START
Magic byte for async + zlib + plaintext blocks.
MAGIC_ASYNC_NO_CRYPT_ZSTD_START
Magic byte for async + zstd + plaintext blocks.
MAGIC_ASYNC_ZLIB_START
Magic byte for async + zlib + encrypted blocks.
MAGIC_ASYNC_ZSTD_START
Magic byte for async + zstd + encrypted blocks.
MAGIC_END
Tail marker terminating a complete xlog block.
MAGIC_SYNC_NO_CRYPT_ZLIB_START
Magic byte for sync + zlib + plaintext blocks.
MAGIC_SYNC_NO_CRYPT_ZSTD_START
Magic byte for sync + zstd + plaintext blocks.
MAGIC_SYNC_ZLIB_START
Magic byte for sync + zlib + encrypted blocks.
MAGIC_SYNC_ZSTD_START
Magic byte for sync + zstd + encrypted blocks.
TAILER_LEN
Byte length of the trailing end marker.

Functions§

magic_start_is_valid
Return whether magic is one of the supported xlog start markers.
select_magic
Select the xlog magic byte for a (compression, append mode, crypto) tuple.
update_end_hour_in_place
Update the encoded end-hour field inside an existing header.
update_log_len_in_place
Add add_len to the payload length stored in an encoded header.