burrow: github.com/hyperledger/burrow/forensics/storage Index | Files

package storage

import "github.com/hyperledger/burrow/forensics/storage"

Index

Package Files

cache_db.go channel_iterator.go kvcache.go multi_iterator.go unique_iterator.go

func Uniq Uses

func Uniq(source storage.KVIterator) *uniqueIterator

type CacheDB Uses

type CacheDB struct {
    // contains filtered or unexported fields
}

func NewCacheDB Uses

func NewCacheDB(backend storage.KVIterableReader) *CacheDB

func (*CacheDB) Close Uses

func (cdb *CacheDB) Close() error

func (*CacheDB) Commit Uses

func (cdb *CacheDB) Commit(writer storage.KVWriter)

func (*CacheDB) Delete Uses

func (cdb *CacheDB) Delete(key []byte) error

func (*CacheDB) DeleteSync Uses

func (cdb *CacheDB) DeleteSync(key []byte) error

func (*CacheDB) Get Uses

func (cdb *CacheDB) Get(key []byte) ([]byte, error)

DB implementation

func (*CacheDB) Has Uses

func (cdb *CacheDB) Has(key []byte) (bool, error)

func (*CacheDB) Iterator Uses

func (cdb *CacheDB) Iterator(low, high []byte) (storage.KVIterator, error)

func (*CacheDB) NewBatch Uses

func (cdb *CacheDB) NewBatch() dbm.Batch

func (*CacheDB) Print Uses

func (cdb *CacheDB) Print() error

func (*CacheDB) ReverseIterator Uses

func (cdb *CacheDB) ReverseIterator(low, high []byte) (storage.KVIterator, error)

func (*CacheDB) Set Uses

func (cdb *CacheDB) Set(key, value []byte) error

func (*CacheDB) SetSync Uses

func (cdb *CacheDB) SetSync(key, value []byte) error

func (*CacheDB) Stats Uses

func (cdb *CacheDB) Stats() map[string]string

type ChannelIterator Uses

type ChannelIterator struct {
    // contains filtered or unexported fields
}

func NewChannelIterator Uses

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 Uses

func (it *ChannelIterator) Close()

func (*ChannelIterator) Domain Uses

func (it *ChannelIterator) Domain() ([]byte, []byte)

func (*ChannelIterator) Error Uses

func (it *ChannelIterator) Error() error

func (*ChannelIterator) Key Uses

func (it *ChannelIterator) Key() []byte

func (*ChannelIterator) Next Uses

func (it *ChannelIterator) Next()

func (*ChannelIterator) Valid Uses

func (it *ChannelIterator) Valid() bool

func (*ChannelIterator) Value Uses

func (it *ChannelIterator) Value() []byte

type KVCache Uses

type KVCache struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

func NewKVCache Uses

func NewKVCache() *KVCache

Creates an in-memory cache wrapping a map that stores the provided tombstone value for deleted keys

func (*KVCache) Delete Uses

func (kvc *KVCache) Delete(key []byte)

func (*KVCache) Get Uses

func (kvc *KVCache) Get(key []byte) []byte

func (*KVCache) Has Uses

func (kvc *KVCache) Has(key []byte) bool

func (*KVCache) Info Uses

func (kvc *KVCache) Info(key []byte) (value []byte, deleted bool)

func (*KVCache) Iterator Uses

func (kvc *KVCache) Iterator(low, high []byte) storage.KVIterator

func (*KVCache) Reset Uses

func (kvc *KVCache) Reset()

func (*KVCache) ReverseIterator Uses

func (kvc *KVCache) ReverseIterator(low, high []byte) storage.KVIterator

func (*KVCache) Set Uses

func (kvc *KVCache) Set(key, value []byte)

func (*KVCache) WriteTo Uses

func (kvc *KVCache) WriteTo(writer storage.KVWriter)

Writes contents of cache to backend without flushing the cache

type KVCacheIterator Uses

type KVCacheIterator struct {
    // contains filtered or unexported fields
}

func (*KVCacheIterator) Close Uses

func (kvi *KVCacheIterator) Close()

func (*KVCacheIterator) Domain Uses

func (kvi *KVCacheIterator) Domain() ([]byte, []byte)

func (*KVCacheIterator) Error Uses

func (kvi *KVCacheIterator) Error() error

func (*KVCacheIterator) Info Uses

func (kvi *KVCacheIterator) Info() (key, value []byte, deleted bool)

func (*KVCacheIterator) Key Uses

func (kvi *KVCacheIterator) Key() []byte

func (*KVCacheIterator) Next Uses

func (kvi *KVCacheIterator) Next()

func (*KVCacheIterator) Valid Uses

func (kvi *KVCacheIterator) Valid() bool

func (*KVCacheIterator) Value Uses

func (kvi *KVCacheIterator) Value() []byte

type KVPair Uses

type KVPair struct {
    Key   []byte
    Value []byte
}

func (KVPair) String Uses

func (kv KVPair) String() string

type KVPairs Uses

type KVPairs []KVPair

func (KVPairs) Len Uses

func (kvp KVPairs) Len() int

func (KVPairs) Less Uses

func (kvp KVPairs) Less(i, j int) bool

func (KVPairs) Sorted Uses

func (kvp KVPairs) Sorted() KVPairs

func (KVPairs) Swap Uses

func (kvp KVPairs) Swap(i, j int)

type MultiIterator Uses

type MultiIterator struct {
    // contains filtered or unexported fields
}

func NewMultiIterator Uses

func NewMultiIterator(reverse bool, iterators ...storage.KVIterator) *MultiIterator

MultiIterator iterates in order over a series o

func (*MultiIterator) Close Uses

func (mi *MultiIterator) Close()

func (*MultiIterator) Domain Uses

func (mi *MultiIterator) Domain() ([]byte, []byte)

func (*MultiIterator) Error Uses

func (mi *MultiIterator) Error() error

func (*MultiIterator) Key Uses

func (mi *MultiIterator) Key() []byte

func (*MultiIterator) Len Uses

func (mi *MultiIterator) Len() int

sort.Interface implementation

func (*MultiIterator) Less Uses

func (mi *MultiIterator) Less(i, j int) bool

func (*MultiIterator) Next Uses

func (mi *MultiIterator) Next()

func (*MultiIterator) Peek Uses

func (mi *MultiIterator) Peek() storage.KVIterator

func (*MultiIterator) Pop Uses

func (mi *MultiIterator) Pop() interface{}

func (*MultiIterator) Push Uses

func (mi *MultiIterator) Push(x interface{})

func (*MultiIterator) Swap Uses

func (mi *MultiIterator) Swap(i, j int)

func (*MultiIterator) Valid Uses

func (mi *MultiIterator) Valid() bool

func (*MultiIterator) Value Uses

func (mi *MultiIterator) Value() []byte

Package storage imports 7 packages (graph) and is imported by 4 packages. Updated 2020-02-29. Refresh now. Tools for package owners.