wal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupUC        = entry.GTUncommit
	GroupC  uint32 = iota + 10
	GroupCatalog
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	GetCheckpointed() uint64
	Checkpoint(indexes []*Index) (LogEntry, error)
	AppendEntry(uint32, LogEntry) (uint64, error)
	LoadEntry(groupId uint32, lsn uint64) (LogEntry, error)
	GetCurrSeqNum() uint64
	GetPenddingCnt() uint64
	Compact() error
	Replay(handle store.ApplyHandle) (err error)
	Close() error
}

func NewDriver

func NewDriver(dir, name string, cfg *store.StoreCfg) Driver

func NewDriverWithStore

func NewDriverWithStore(impl store.Store, own bool) Driver

type Index

type Index struct {
	LSN  uint64
	CSN  uint32
	Size uint32
}

func NewIndex

func NewIndex(lsn uint64, csn, size uint32) *Index

func (*Index) Clone

func (index *Index) Clone() *Index

func (*Index) Compare

func (index *Index) Compare(o *Index) int

func (*Index) ReadFrom

func (index *Index) ReadFrom(r io.Reader) (n int64, err error)

func (*Index) String

func (index *Index) String() string

func (*Index) WriteTo

func (index *Index) WriteTo(w io.Writer) (n int64, err error)

type LogEntry

type LogEntry entry.Entry

type ReplayObserver

type ReplayObserver interface {
	OnTimeStamp(uint64)
	OnStaleIndex(*Index)
}

Jump to

Keyboard shortcuts

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