Documentation ¶
Index ¶
- Variables
- type AppendCallback
- type AppendOneCallback
- type OnEntryCallback
- type Option
- type Range
- func Append(ctx context.Context, w *WAL, entries [][]byte) ([]Range, error)
- func AppendOne(ctx context.Context, w *WAL, entry []byte) (Range, error)
- func DirectAppend(ctx context.Context, w *WAL, entries [][]byte) ([]Range, error)
- func DirectAppendOne(ctx context.Context, w *WAL, entry []byte) (Range, error)
- type WAL
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClosed = errors.New("wal: closed") ErrNotFoundLogFile = errors.New("wal: not found log file") )
View Source
var (
ErrOutOfRange = errors.New("WAL: out of range")
)
Functions ¶
This section is empty.
Types ¶
type AppendCallback ¶
type AppendOneCallback ¶
type OnEntryCallback ¶
type Option ¶
type Option func(*config)
func FromPosition ¶
func WithBlockSize ¶
func WithFileSize ¶
func WithFlushDelayTime ¶
func WithIOEngine ¶
func WithReadOnly ¶ added in v0.9.0
func WithReadOnly() Option
func WithRecoveryCallback ¶
func WithRecoveryCallback(cb OnEntryCallback) Option
type Range ¶
func DirectAppend ¶
type WAL ¶
type WAL struct {
// contains filtered or unexported fields
}
WAL is write-ahead log.
func (*WAL) Append ¶
func (w *WAL) Append(ctx context.Context, entries [][]byte, cb AppendCallback)
Append appends entries to WAL.
Click to show internal directories.
Click to hide internal directories.