wal

package
v0.0.205 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EntryHeader      int = 0b10100000
	RecordHeaderSize     = 8
)

Variables

View Source
var (
	StartWalSequence = iface.SequenceId{Term: 1, Collection: 1, Seq: 1}
)

Functions

This section is empty.

Types

type DiskWal

type DiskWal struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewDiskWal

func NewDiskWal(folder string) *DiskWal

func (*DiskWal) CurrentSequence

func (d *DiskWal) CurrentSequence() iface.SequenceId

func (*DiskWal) Initialize

func (d *DiskWal) Initialize() (iface.SequenceId, error)

func (*DiskWal) ReplayIncomplete

func (d *DiskWal) ReplayIncomplete(from iface.SequenceId, f func(entry []byte) error) (iface.SequenceId, error)

func (*DiskWal) WriteEntry

func (d *DiskWal) WriteEntry(bytes []byte) (iface.SequenceId, error)

func (*DiskWal) WriteEntryWithFullPage

func (d *DiskWal) WriteEntryWithFullPage(bytes []byte) (iface.SequenceId, error)

type EntryType

type EntryType int
const (
	EntryTypeWhole     EntryType = 0b00001001
	EntryTypeStart     EntryType = 0b00001010
	EntryTypeMiddle    EntryType = 0b00001011
	EntryTypeEnd       EntryType = 0b00001100
	EntryTypeBrokenEnd EntryType = 0b00001101

	EntryTypeMask = 0b00001111
)

Jump to

Keyboard shortcuts

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