raftbadger

package module
v0.0.0-...-82e0e1f Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

README

raft-badger

Build Status GoDoc Go Report Card License

The package exports the BadgerStore which is an implementation of both a LogStore and StableStore on top of Badger, an embeddable, persistent, simple and fast key-value (KV) store, written natively in Go.

It is meant to be used as a backend for the raft package here.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotFound = errors.New("not found")

Functions

This section is empty.

Types

type LogStore

type LogStore interface {
	raft.LogStore
	io.Closer
}

LogStore combines raft.LogStore and io.Closer

func NewLogStore

func NewLogStore(dir string, opt *badger.Options) (LogStore, error)

NewLogStore uses the supplied options to open a log store. badger.DefaultOptions will be used, if nil is passed for opt.

type StableStore

type StableStore interface {
	raft.StableStore
	io.Closer
}

StableStore combines raft.StableStore and io.Closer

func NewStableStore

func NewStableStore(dir string, opt *badger.Options) (StableStore, error)

NewStableStore uses the supplied options to open a stable store. badger.DefaultOptions will be used, if nil is passed for opt.

Jump to

Keyboard shortcuts

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