wal

package
v0.0.0-...-caec882 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogTypeProposal         = 1
	LogTypeVote             = 2
	LogTypeState            = 3
	LogTypePrevHash         = 4
	LogTypeCommits          = 5
	LogTypeVerifiedProposal = 6
	LogTypeAuthTxs          = 7
)

Variables

View Source
var (
	ErrNotExists = errors.New("WAL not exists")
)

Functions

func IsNotExists

func IsNotExists(err error) bool

Types

type Interface

type Interface interface {
	SetHeight(ctx context.Context, height uint64) error
	Save(ctx context.Context, logType LogType, data []byte) error
	Load(ctx context.Context) (LogType, []byte, error)
}

func NewFileWAL

func NewFileWAL(path string) (Interface, error)

type LogType

type LogType uint8

func (LogType) String

func (l LogType) String() string

Jump to

Keyboard shortcuts

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