Documentation ¶
Index ¶
- func Uniq(source storage.KVIterator) *uniqueIterator
- type CacheDB
- func (cdb *CacheDB) Close() error
- func (cdb *CacheDB) Commit(writer storage.KVWriter)
- func (cdb *CacheDB) Delete(key []byte) error
- func (cdb *CacheDB) DeleteSync(key []byte) error
- func (cdb *CacheDB) Get(key []byte) ([]byte, error)
- func (cdb *CacheDB) Has(key []byte) (bool, error)
- func (cdb *CacheDB) Iterator(low, high []byte) (storage.KVIterator, error)
- func (cdb *CacheDB) NewBatch() dbm.Batch
- func (cdb *CacheDB) Print() error
- func (cdb *CacheDB) ReverseIterator(low, high []byte) (storage.KVIterator, error)
- func (cdb *CacheDB) Set(key, value []byte) error
- func (cdb *CacheDB) SetSync(key, value []byte) error
- func (cdb *CacheDB) Stats() map[string]string
- type ChannelIterator
- type KVCache
- func (kvc *KVCache) Delete(key []byte)
- func (kvc *KVCache) Get(key []byte) []byte
- func (kvc *KVCache) Has(key []byte) bool
- func (kvc *KVCache) Info(key []byte) (value []byte, deleted bool)
- func (kvc *KVCache) Iterator(low, high []byte) storage.KVIterator
- func (kvc *KVCache) Reset()
- func (kvc *KVCache) ReverseIterator(low, high []byte) storage.KVIterator
- func (kvc *KVCache) Set(key, value []byte)
- func (kvc *KVCache) WriteTo(writer storage.KVWriter)
- type KVCacheIterator
- func (kvi *KVCacheIterator) Close() error
- func (kvi *KVCacheIterator) Domain() ([]byte, []byte)
- func (kvi *KVCacheIterator) Error() error
- func (kvi *KVCacheIterator) Info() (key, value []byte, deleted bool)
- func (kvi *KVCacheIterator) Key() []byte
- func (kvi *KVCacheIterator) Next()
- func (kvi *KVCacheIterator) Valid() bool
- func (kvi *KVCacheIterator) Value() []byte
- type KVPair
- type KVPairs
- type MultiIterator
- func (mi *MultiIterator) Close() error
- func (mi *MultiIterator) Domain() ([]byte, []byte)
- func (mi *MultiIterator) Error() error
- func (mi *MultiIterator) Key() []byte
- func (mi *MultiIterator) Len() int
- func (mi *MultiIterator) Less(i, j int) bool
- func (mi *MultiIterator) Next()
- func (mi *MultiIterator) Peek() storage.KVIterator
- func (mi *MultiIterator) Pop() interface{}
- func (mi *MultiIterator) Push(x interface{})
- func (mi *MultiIterator) Swap(i, j int)
- func (mi *MultiIterator) Valid() bool
- func (mi *MultiIterator) Value() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Uniq ¶
func Uniq(source storage.KVIterator) *uniqueIterator
Types ¶
type CacheDB ¶
type CacheDB struct {
// contains filtered or unexported fields
}
func NewCacheDB ¶
func NewCacheDB(backend storage.KVIterableReader) *CacheDB
func (*CacheDB) DeleteSync ¶
func (*CacheDB) Iterator ¶
func (cdb *CacheDB) Iterator(low, high []byte) (storage.KVIterator, error)
func (*CacheDB) ReverseIterator ¶
func (cdb *CacheDB) ReverseIterator(low, high []byte) (storage.KVIterator, error)
type ChannelIterator ¶
type ChannelIterator struct {
// contains filtered or unexported fields
}
func NewChannelIterator ¶
func NewChannelIterator(ch <-chan KVPair, start, end []byte) *ChannelIterator
ChannelIterator wraps a stream of kvp KVPairs over a channel as a stateful KVIterator. The start and end keys provided are purely indicative (for Domain()) and are assumed to be honoured by the input channel - they are not checked and keys are not sorted. NewChannelIterator will block until the first value is received over the channel.
func (*ChannelIterator) Close ¶
func (it *ChannelIterator) Close() error
func (*ChannelIterator) Domain ¶
func (it *ChannelIterator) Domain() ([]byte, []byte)
func (*ChannelIterator) Error ¶ added in v0.30.0
func (it *ChannelIterator) Error() error
func (*ChannelIterator) Key ¶
func (it *ChannelIterator) Key() []byte
func (*ChannelIterator) Next ¶
func (it *ChannelIterator) Next()
func (*ChannelIterator) Valid ¶
func (it *ChannelIterator) Valid() bool
func (*ChannelIterator) Value ¶
func (it *ChannelIterator) Value() []byte
type KVCache ¶
func NewKVCache ¶
func NewKVCache() *KVCache
Creates an in-memory cache wrapping a map that stores the provided tombstone value for deleted keys
func (*KVCache) ReverseIterator ¶
func (kvc *KVCache) ReverseIterator(low, high []byte) storage.KVIterator
type KVCacheIterator ¶
type KVCacheIterator struct {
// contains filtered or unexported fields
}
func (*KVCacheIterator) Close ¶
func (kvi *KVCacheIterator) Close() error
func (*KVCacheIterator) Domain ¶
func (kvi *KVCacheIterator) Domain() ([]byte, []byte)
func (*KVCacheIterator) Error ¶ added in v0.30.0
func (kvi *KVCacheIterator) Error() error
func (*KVCacheIterator) Info ¶
func (kvi *KVCacheIterator) Info() (key, value []byte, deleted bool)
func (*KVCacheIterator) Key ¶
func (kvi *KVCacheIterator) Key() []byte
func (*KVCacheIterator) Next ¶
func (kvi *KVCacheIterator) Next()
func (*KVCacheIterator) Valid ¶
func (kvi *KVCacheIterator) Valid() bool
func (*KVCacheIterator) Value ¶
func (kvi *KVCacheIterator) Value() []byte
type MultiIterator ¶
type MultiIterator struct {
// contains filtered or unexported fields
}
func NewMultiIterator ¶
func NewMultiIterator(reverse bool, iterators ...storage.KVIterator) *MultiIterator
MultiIterator iterates in order over a series o
func (*MultiIterator) Close ¶
func (mi *MultiIterator) Close() error
func (*MultiIterator) Domain ¶
func (mi *MultiIterator) Domain() ([]byte, []byte)
func (*MultiIterator) Error ¶ added in v0.30.0
func (mi *MultiIterator) Error() error
func (*MultiIterator) Key ¶
func (mi *MultiIterator) Key() []byte
func (*MultiIterator) Less ¶
func (mi *MultiIterator) Less(i, j int) bool
func (*MultiIterator) Next ¶
func (mi *MultiIterator) Next()
func (*MultiIterator) Peek ¶
func (mi *MultiIterator) Peek() storage.KVIterator
func (*MultiIterator) Pop ¶
func (mi *MultiIterator) Pop() interface{}
func (*MultiIterator) Push ¶
func (mi *MultiIterator) Push(x interface{})
func (*MultiIterator) Swap ¶
func (mi *MultiIterator) Swap(i, j int)
func (*MultiIterator) Valid ¶
func (mi *MultiIterator) Valid() bool
func (*MultiIterator) Value ¶
func (mi *MultiIterator) Value() []byte
Click to show internal directories.
Click to hide internal directories.