package
2.0.212+incompatible
Repository: https://github.com/asonawalla/gazette.git
Documentation: pkg.go.dev
# Functions
FramingByContentType returns the Framing having the corresponding |contentType|, or returns an error if none match.
ModuloMapping returns a MappingFunc which maps a Message into a stable Journal of the PartitionsFunc, selected via 32-bit FNV-1a of the MappingKeyFunc and modulo arithmetic.
Publish maps the Message to its target journal and begins an Append of the Message's marshaled content under the mapped journal framing.
RandomMapping returns a MappingFunc which maps a Message to a randomly selected Journal of the PartitionsFunc.
RendezvousMapping returns a MappingFunc which maps a Message into a stable Journal of the PartitionsFunc, selected via 32-bit FNV-1a of the MappingKeyFunc and Highest Random Weight (aka "rendezvous") hashing.
UnpackLine returns bytes through to the first encountered newline "\n".
# Constants
FixedFrameHeaderLength is the number of leading header bytes of each frame: A 4-byte magic word followed by a little-endian length.
# Variables
ErrDesyncDetected is returned by Unmarshal upon detection of an invalid frame.
ErrEmptyListResponse is returned by a MappingFunc which received an empty ListResponse from a PartitionsFunc.
FixedFraming is a Framing implementation which encodes messages in a binary format with a fixed-length header.
JSONFraming is a Framing implementation which encodes messages as line- delimited JSON.
# Type aliases
MappingFunc maps a Message to a responsible journal.
MappingKeyFunc extracts an appropriate mapping key from the Message, optionally using the provided temporary buffer, and returns it.
PartitionsFunc returns a ListResponse of journal partitions from which a MappingFunc may select.