Versions in this module Expand all Collapse all v0 v0.1.0 Dec 1, 2019 Changes in this version + const SequencePartitions + const SequencePreretrieve + const SequenceRangeSize + var ErrNotFound = fmt.Errorf("not found") + var ErrStopped = fmt.Errorf("barge has been stopped") + type Decoder interface + Decode func(src []byte) error + type Encoder interface + Encode func() []byte + type Iterator struct + func (i *Iterator) Close() + func (i *Iterator) Item() *badger.Item + func (i *Iterator) Next() + func (i *Iterator) Rewind() + func (i *Iterator) Seek(key []byte) + func (i *Iterator) Valid() bool + func (i *Iterator) ValidForPrefix(prefix []byte) bool + type Options struct + Directory string + Peers []string + type Store struct + func NewStore(listener net.Listener, logger timber.Logger, options Options) (*Store, error) + func (s *Store) Address() string + func (s *Store) Begin() (*Transaction, error) + func (s *Store) BeginAt(timestamp time.Time) (*Transaction, error) + func (s *Store) IsLeader() bool + func (s *Store) IsStopped() bool + func (s *Store) NextIncrementId(objectPath []byte) (uint64, error) + func (s *Store) NextSequenceId(sequenceName string) (uint64, error) + func (s *Store) NodeID() raft.ServerID + func (s *Store) Start() error + func (s *Store) Stop() error + func (s *Store) WaitForLeader(timeout time.Duration) (leaderAddress string, hasLeader bool, err error) + type Transaction struct + func (s *Transaction) Commit() error + func (s *Transaction) Delete(key []byte) error + func (s *Transaction) Get(key []byte) ([]byte, bool, error) + func (s *Transaction) GetIterator(prefix []byte, keyOnly bool, reverse bool) *Iterator + func (s *Transaction) IsLeader() bool + func (s *Transaction) IsStopped() bool + func (s *Transaction) MustGet(key []byte) ([]byte, bool, error) + func (s *Transaction) NextIncrementId(objectPath []byte) (uint64, error) + func (s *Transaction) NextSequenceId(sequenceName string) (uint64, error) + func (s *Transaction) NodeID() raft.ServerID + func (s *Transaction) Rollback() error + func (s *Transaction) Set(key, value []byte) error + func (s *Transaction) WaitForLeader(timeout time.Duration) (leaderAddress string, hasLeader bool, err error)