Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
Options wal options to create new WAL. WAL logs uses cyclic rotation to avoid fragmentation. It allocates free blocks only when log reaches target size.
type Reader ¶
Reader reads logs from WAL. Reader reader is a simple iterator over log data.
type WAL ¶
type WAL struct { WALInfo // contains filtered or unexported fields }
WAL write ahead logs to recover db commit failure dues to db crash or other unexpected errors.
func New ¶
New will open a WAL. If the previous run did not shut down cleanly, a set of log entries will be returned which got committed successfully to the WAL, but were never signaled as fully completed.
If no WAL exists, a new one will be created.
func (*WAL) SignalLogApplied ¶
SignalLogApplied informs the WAL that it is safe to reuse blocks.
type WALInfo ¶
type WALInfo struct {
// contains filtered or unexported fields
}
WALInfo provides WAL stats.
type Writer ¶
Writer writes entries to the write ahead log. Thread-safe.
func (*Writer) SignalInitWrite ¶
SignalInitWrite will signal to the WAL that log append has completed, and that the WAL can safely write log and being applied atomically.