raftjss

package module
v0.0.0-...-7b83f95 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: MIT Imports: 8 Imported by: 1

README

raft-jss

This repository provides the raftjss package. It's a key/value store that implements raft.StableStore from the hashicorp/raft project.

Contact

Josh Baker @tidwall

License

raft-jss source code is available under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

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

ErrKeyNotFound is returned when a key is not found

Functions

This section is empty.

Types

type StableStore

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

StableStore represents key/value storage for Raft.

func Open

func Open(path string) (*StableStore, error)

Open a StableStore.

func (*StableStore) Get

func (s *StableStore) Get(key []byte) ([]byte, error)

Get value of key

func (*StableStore) GetUint64

func (s *StableStore) GetUint64(key []byte) (uint64, error)

GetUint64 is like Get, but for uint64 values

func (*StableStore) Set

func (s *StableStore) Set(key, value []byte) error

Set value of key

func (*StableStore) SetUint64

func (s *StableStore) SetUint64(key []byte, value uint64) error

SetUint64 is like Set, but for uint64 values

Jump to

Keyboard shortcuts

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