# Functions
New creates a new CommitLog for persisting and reading messages.
NewLogFromEntry takes the LogEntry and builds the underlying []byte to be stored.
NewNamespaceCompactor creates a new Compactor to be used for tracking messages based on the namespace.
NewSegment creates a new instance of Segment with the provided parameters and initializes its NextOffset and Position should the file be non-empty.
ReadEntry takes an io.Reader and returns a LogEntry.
WithMaxSegmentBytes defines the maximum limit a log segment can reach before needing to create a new one.
WithPath defines the directory where all data will be stored.
# Constants
currently supported Modes are Copy, Sync, and Complete.
currently supported Modes are Copy, Sync, and Complete.
LogNameFormat defines the filename structure for active segments.
currently supported Modes are Copy, Sync, and Complete.
# Variables
ErrEmptyPath will be returned if the provided path is an empty string.
ErrOffsetNotFound is returned when the requested offset is not in the segment.
ErrSegmentNotFound is returned with no segment is found given the provided offset.
# Structs
CommitLog is how the rest of the system will interact with the underlying log segments to persist and read messages.
LogEntry represents the high level representation of the message portion of each entry in the commit log.
Reader implements io.Reader for use with reading from the commit log.
Segment handles reading and writing to the underlying files on disk.
# Interfaces
Compactor defines the necessary functions for performing compaction of log segments.
# Type aliases
Log is a alias type for []byte.
Mode is a representation of where a in the process a reader is with respect to a given namespace.
OptionFunc is a function that configures a CommitLog.