Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyNotFound error ErrKeyNotFound = errors.New("key not found") )
Functions ¶
func SnappyDecode ¶
func SnappyEncode ¶
Types ¶
type Store ¶
type Store interface { // Close the current Store Close() (err error) // Remove the current Store Remove() (err error) // RunGC garbage collect the undelying DB RunGC() (err error) // NewTxn creates a rw/ro transaction NewTxn(update bool) (txn Txn) }
Store interface
type Txn ¶
type Txn interface { // Discard this transaction Discard() // Commit this transaction Commit() (err error) // Get value for the given key Get(key []byte) (value []byte, err error) // GetTree for the given prefix GetTree(prefix []byte) (entries []Entry, err error) // Set value for the given key Set(key, value []byte) (err error) // SetWithTTL value for the given key SetWithTTL(key, value []byte, ttl time.Duration) (err error) // Delete the given key Delete(key []byte) (err error) // DeleteTree for the given prefix DeleteTree(prefix []byte) (err error) }
Txn interface
Click to show internal directories.
Click to hide internal directories.