wal

package
v0.1.0-alpha.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCorrupt          = errors.New("meldbase wal: corrupt log")
	ErrRecoveryRequired = errors.New("meldbase wal: recovery required")
)

Functions

func Open

func Open(path string, checkpointToken uint64) (*Log, []Record, error)

func OpenWithOptions

func OpenWithOptions(path string, checkpointToken uint64, options OpenOptions) (*Log, []Record, OpenReport, error)

func OpenWithReport

func OpenWithReport(path string, checkpointToken uint64) (*Log, []Record, OpenReport, error)

Types

type Log

type Log struct {
	// contains filtered or unexported fields
}

func (*Log) Append

func (l *Log) Append(token uint64, payload []byte) error

func (*Log) Close

func (l *Log) Close() error

func (*Log) Reset

func (l *Log) Reset(checkpointToken uint64) error

func (*Log) Size

func (l *Log) Size() int64

Size reports the current durable log length. Callers serialize Append and Reset; Meldbase uses it only while holding the database lock.

type OpenOptions

type OpenOptions struct{ RequireClean bool }

type OpenReport

type OpenReport struct {
	RecordsReplayed uint64
	BytesDiscarded  uint64
}

type Record

type Record struct {
	Token   uint64
	Payload []byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL