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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址