Documentation ¶
Index ¶
- type Store
- func (tkv *Store) CacheWrap() types.CacheWrap
- func (tkv *Store) CacheWrapWithListeners(_ types.StoreKey, _ []types.WriteListener) types.CacheWrap
- func (tkv *Store) CacheWrapWithTrace(_ io.Writer, _ types.TraceContext) types.CacheWrap
- func (tkv *Store) Delete(key []byte)
- func (tkv *Store) Get(key []byte) []byte
- func (tkv *Store) GetStoreType() types.StoreType
- func (tkv *Store) Has(key []byte) bool
- func (tkv *Store) Iterator(start, end []byte) types.Iterator
- func (tkv *Store) Prefetch(key []byte, forSet bool) (hits, misses int, value []byte)
- func (tkv *Store) ReverseIterator(start, end []byte) types.Iterator
- func (tkv *Store) Set(key []byte, value []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the KVStore interface with tracing enabled. Operations are traced on each core KVStore call and written to the underlying io.writer.
TODO: Should we use a buffered writer and implement Commit on Store?
func NewStore ¶
NewStore returns a reference to a new traceKVStore given a parent KVStore implementation and a buffered writer.
func (*Store) CacheWrap ¶
CacheWrap implements the KVStore interface. It panics because a Store cannot be branched.
func (*Store) CacheWrapWithListeners ¶ added in v0.46.0
CacheWrapWithListeners implements the CacheWrapper interface.
func (*Store) CacheWrapWithTrace ¶
CacheWrapWithTrace implements the KVStore interface. It panics as a Store cannot be branched.
func (*Store) Delete ¶
Delete implements the KVStore interface. It traces a write operation and delegates the Delete call to the parent KVStore.
func (*Store) Get ¶
Get implements the KVStore interface. It traces a read operation and delegates a Get call to the parent KVStore.
func (*Store) GetStoreType ¶
GetStoreType implements the KVStore interface. It returns the underlying KVStore type.
func (*Store) Has ¶
Has implements the KVStore interface. It delegates the Has call to the parent KVStore.
func (*Store) Iterator ¶
Iterator implements the KVStore interface. It delegates the Iterator call the to the parent KVStore.
func (*Store) Prefetch ¶ added in v0.45.0
Prefetch implements the KVStore interface. It traces a read operation and delegates a Get call to the parent KVStore.
func (*Store) ReverseIterator ¶
ReverseIterator implements the KVStore interface. It delegates the ReverseIterator call the to the parent KVStore.