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: ? 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

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
bard command

Jump to

Keyboard shortcuts

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