simplewal

package
v0.0.0-...-f247ec5 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package simplewal is a basic WAL implementation meant to be the first 'real' WAL option for mirbft. More sophisticated WALs with checksums, byte alignments, etc. may be produced in the future, but this is just a simple place to start.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WAL

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

func Open

func Open(path string) (*WAL, error)

func (*WAL) Close

func (w *WAL) Close() error

func (*WAL) IsEmpty

func (w *WAL) IsEmpty() (bool, error)

func (*WAL) LoadAll

func (w *WAL) LoadAll(forEach func(index uint64, p *msgs.Persistent)) error

func (*WAL) Sync

func (w *WAL) Sync() error

func (*WAL) Truncate

func (w *WAL) Truncate(index uint64) error

func (*WAL) Write

func (w *WAL) Write(index uint64, p *msgs.Persistent) error

Jump to

Keyboard shortcuts

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