db

package
v0.0.0-...-e47cf43 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RaftEntry

type RaftEntry struct {
	Term  uint64
	Index uint64
}

type SnapshotState

type SnapshotState struct {
	SnapshotIndex uint64
	AppliedIndex  uint64
}

type Store

type Store interface {
	io.Closer
	GetLastAppliedEntry() (RaftEntry, error)
	Save(RaftEntry, []byte) ([]byte, error)
	Load([]byte) ([]byte, error)

	Backup(SnapshotState) (io.ReadCloser, error)
	Restore(io.ReadCloser) error
}

Jump to

Keyboard shortcuts

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