Documentation ¶
Index ¶
- Variables
- func BlobAdapter(c KV) blobAdapter
- func Exists(kv KV, key []byte) (bool, error)
- func PrefixEnd(prefix []byte) []byte
- type BoltDB
- type Cell
- type DB
- type KV
- type KVCell
- type MemCell
- type MemDB
- type MemKV
- func (kv *MemKV) Bucket(p string) KV
- func (kv *MemKV) Delete(key []byte) error
- func (kv *MemKV) ForEach(start, end []byte, fn func(k, v []byte) error) error
- func (kv *MemKV) GetF(key []byte, f func([]byte) error) error
- func (kv *MemKV) NextSequence() (uint64, error)
- func (kv *MemKV) Put(key, value []byte) error
- func (kv *MemKV) SizeTotal() uint64
- func (kv *MemKV) SizeUsed() uint64
- type PrefixedDB
- type PrefixedTxDB
- type QuotaDB
- type TxDB
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFull = errors.New("store is full") ErrNotExist = errors.New("key does not exist") )
Functions ¶
func BlobAdapter ¶
func BlobAdapter(c KV) blobAdapter
Types ¶
type KV ¶
type KV interface { GetF(k []byte, f func([]byte) error) error Put(k, v []byte) error Delete(k []byte) error NextSequence() (uint64, error) // calls fn with first <= k < last // if last == nil ForEach will call fn with the last key ForEach(first, last []byte, fn func(k, v []byte) error) error SizeTotal() uint64 SizeUsed() uint64 }
type MemKV ¶
type MemKV struct { Capacity uint64 // contains filtered or unexported fields }
func (*MemKV) NextSequence ¶
type PrefixedDB ¶
func (PrefixedDB) Bucket ¶
func (db PrefixedDB) Bucket(p string) KV
type PrefixedTxDB ¶
Click to show internal directories.
Click to hide internal directories.