Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Wal ¶
type Wal interface { // Name returns the name of the write ahead log Name() string // Read reads the data of the entry with the given sequence number and returns it Read(_seqNum uint64) ([]byte, error) // ReadAt reads the data of the entry with the given sequence number to _entry // Deprecated ReadAt(_entry Entry, _seqNum uint64) error // ReadTo reads the data of the entry with the given sequence number to _entry ReadTo(_entry encoding.BinaryUnmarshaler, _seqNum uint64) error // ReadFrom reads the payload of _n entries starting from _seqNum ReadFrom(_seqNum uint64, _n int64) (<-chan Envelope, error) // Write writes the given data on disk and returns the new sequence number Write(_data []byte) (uint64, error) // WriteFrom extracts data from the given object and writes it on disk. it returns the new sequence number WriteFrom(r encoding.BinaryMarshaler) (uint64, error) // Truncate dumps all records whose sequence number is greater or equal to offsetByPos Truncate(_seqNum uint64) error // Sync flushes changes to persistent storage and returns the latest safe sequence number Sync() (uint64, error) // First returns the first sequence number in the write ahead log First() uint64 // SeqNum returns the latest written sequence number in the write ahead log SeqNum() uint64 // Safe returns the latest safe sequence number Safe() uint64 // Close closes the write ahead log and all segment files Close() error }
Click to show internal directories.
Click to hide internal directories.