Documentation ¶
Overview ¶
Package store is a generated protocol buffer package.
It is generated from these files:
kv.proto
It has these top-level messages:
ProtoKVItem
Index ¶
- Variables
- func NewDeleteCommand(key string) *command
- func NewFSM(path string) (*fsm, error)
- func NewSetCommand(key, value string) *command
- type BadgerDB
- type DB
- type DataItem
- type KVItem
- type ProtoKVItem
- type Store
- func (s *Store) Delete(key string) error
- func (s *Store) Get(key string) (string, error)
- func (s *Store) Join(nodeID, addr string) error
- func (s *Store) Leave(nodeID string) error
- func (s *Store) Open(bootstrap bool, localID string) error
- func (s *Store) Set(key, value string) error
- func (s *Store) Snapshot() error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrIterFinished = errors.New("ERR iteration finished successfully")
)
View Source
var (
ErrNotLeader error = errors.New("not leader")
)
Functions ¶
func NewDeleteCommand ¶
func NewDeleteCommand(key string) *command
func NewSetCommand ¶
func NewSetCommand(key, value string) *command
Types ¶
type BadgerDB ¶
type BadgerDB struct {
// contains filtered or unexported fields
}
func NewBadgerDB ¶
func (*BadgerDB) SnapshotItems ¶
type KVItem ¶
type KVItem struct {
// contains filtered or unexported fields
}
func (*KVItem) IsFinished ¶
type ProtoKVItem ¶
type ProtoKVItem struct { Key []byte `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*ProtoKVItem) Descriptor ¶
func (*ProtoKVItem) Descriptor() ([]byte, []int)
func (*ProtoKVItem) GetKey ¶
func (m *ProtoKVItem) GetKey() []byte
func (*ProtoKVItem) GetValue ¶
func (m *ProtoKVItem) GetValue() []byte
func (*ProtoKVItem) ProtoMessage ¶
func (*ProtoKVItem) ProtoMessage()
func (*ProtoKVItem) Reset ¶
func (m *ProtoKVItem) Reset()
func (*ProtoKVItem) String ¶
func (m *ProtoKVItem) String() string
Click to show internal directories.
Click to hide internal directories.