raftwal

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: AGPL-3.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RaftId added in v0.9.0

func RaftId(wals *badger.ManagedDB) (uint64, error)

Types

type Wal

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

func Init

func Init(walStore *badger.ManagedDB, id uint64) *Wal

func (*Wal) Entries

func (w *Wal) Entries(gid uint32, fromTerm, fromIndex uint64) (es []raftpb.Entry, rerr error)

func (*Wal) HardState

func (w *Wal) HardState(gid uint32) (hd raftpb.HardState, rerr error)

func (*Wal) Snapshot

func (w *Wal) Snapshot(gid uint32) (snap raftpb.Snapshot, rerr error)

func (*Wal) Store

func (w *Wal) Store(gid uint32, h raftpb.HardState, es []raftpb.Entry) error

Store stores the hardstate and entries for a given RAFT group.

func (*Wal) StoreRaftId added in v0.9.0

func (w *Wal) StoreRaftId(id uint64) error

func (*Wal) StoreSnapshot added in v0.7.1

func (w *Wal) StoreSnapshot(gid uint32, s raftpb.Snapshot) error

Jump to

Keyboard shortcuts

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