Versions in this module Expand all Collapse all v2 v2.3.3 Oct 19, 2023 Changes in this version + var DefaultOptions = &Options + var ErrClosed = errors.New("log closed") + var ErrCorrupt = errors.New("log corrupt") + var ErrNotFound = errors.New("not found") + var ErrOutOfOrder = errors.New("out of order") + var ErrOutOfRange = errors.New("out of range") + type Batch struct + func (b *Batch) Clear() + func (b *Batch) Write(index uint64, data []byte) + type CRC uint32 + func NewCRC(b []byte) CRC + func (c CRC) Update(b []byte) CRC + func (c CRC) Value() uint32 + type Log struct + func Open(path string, opts *Options) (*Log, error) + func (l *Log) ClearCache() error + func (l *Log) Close() error + func (l *Log) FirstIndex() (index uint64, err error) + func (l *Log) LastIndex() (index uint64, err error) + func (l *Log) Read(index uint64) (data []byte, err error) + func (l *Log) Sync() error + func (l *Log) TruncateBack(index uint64) error + func (l *Log) TruncateFront(index uint64) error + func (l *Log) Write(index uint64, data []byte) error + func (l *Log) WriteBatch(b *Batch) error + type LogFormat byte + const Binary + const JSON + type Options struct + LogFormat LogFormat + NoCopy bool + NoSync bool + SegmentCacheSize int + SegmentSize int