bard

package module
v0.0.0-...-2db5193 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2017 License: MIT Imports: 12 Imported by: 0

README

bard

BoltDB as Sharded and Distributed Key-Value Store

A side project to explore working of distributed databases.

Documentation

Index

Constants

View Source
const (
	BardConfigBucket = "bard-config-bucket"
	KeyShardNumber   = "number-of-shards"
)

Variables

View Source
var (
	ErrInvalidShardNumber = errors.New("Invalid number of shards")
	ErrDB                 = errors.New("DB not open")
	ErrShardNumber        = errors.New("Unable to get shard number")
)
View Source
var (
	ErrCmdUnmarshal     = errors.New("interface type not supported")
	ErrCmdNilReceived   = errors.New("received nil instead of []byte")
	ErrCmdInvalidAction = errors.New("invalid command action")
)

Functions

func Close

func Close() error

func Get

func Get(key []byte) ([]byte, error)

func Open

func Open(path, port string, shards int64, peers []string) error

func Put

func Put(key, val []byte) error

Types

type Store

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

func (*Store) Ready

func (s *Store) Ready() bool

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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