Documentation ¶
Overview ¶
Package badgerkv provides an adapter to Badger's key-value store that is compatible with libkv's Store interface.
Index ¶
- Constants
- Variables
- type Lister
- type Store
- func (t *Store) AtomicDelete(key string, previous *store.KVPair) (bool, error)
- func (t *Store) AtomicPut(key string, value []byte, previous *store.KVPair, options *store.WriteOptions) (bool, *store.KVPair, error)
- func (t *Store) Close()
- func (t *Store) DB() *badger.DB
- func (t *Store) Delete(key string) error
- func (t *Store) DeleteRange(start, end string) error
- func (*Store) DeleteTree(directory string) error
- func (t *Store) Exists(key string) (bool, error)
- func (t *Store) Get(key string) (*store.KVPair, error)
- func (t *Store) GetInto(key string, buf []byte) (*store.KVPair, error)
- func (*Store) List(directory string) ([]*store.KVPair, error)
- func (t *Store) ListKeys(start string) ([]string, error)
- func (*Store) NewLock(key string, options *store.LockOptions) (store.Locker, error)
- func (t *Store) Put(key string, value []byte, options *store.WriteOptions) error
- func (*Store) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error)
- func (*Store) WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error)
Constants ¶
View Source
const ( MaxValueLogFileSize = 256 << 20 MaxDeleteTransactionSize = 65536 MaxListedKeys = 16 )
Variables ¶
View Source
var ( ErrKeyNotFound = store.ErrKeyNotFound ErrKeyExists = store.ErrKeyExists ErrKeyModified = store.ErrKeyModified )
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AtomicDelete ¶
func (*Store) DeleteRange ¶
DeleteRange deletes the range of keys [start, end). The range is open and the end key is not deleted. Returns nil if all keys in the range are deleted. There are no guarantees which keys have been deleted on error.
func (*Store) DeleteTree ¶
Click to show internal directories.
Click to hide internal directories.