Documentation ¶
Index ¶
- type Store
- func (s *Store) CacheWrap() types.CacheWrap
- func (s *Store) CacheWrapWithListeners(_ types.StoreKey, _ []types.WriteListener) types.CacheWrap
- func (s *Store) CacheWrapWithTrace(_ io.Writer, _ types.TraceContext) types.CacheWrap
- func (s *Store) Delete(key []byte)
- func (s *Store) Get(key []byte) []byte
- func (s *Store) GetStoreType() types.StoreType
- func (s *Store) Has(key []byte) bool
- func (s *Store) Iterator(start, end []byte) types.Iterator
- func (s *Store) ReverseIterator(start, end []byte) types.Iterator
- func (s *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 listening enabled. Operations are traced on each core KVStore call and written to any of the underlying listeners with the proper key and operation permissions
func NewStore ¶
func NewStore(parent types.KVStore, parentStoreKey types.StoreKey, listeners []types.WriteListener) *Store
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 as a Store cannot be cache wrapped.
func (*Store) CacheWrapWithListeners ¶
CacheWrapWithListeners implements the KVStore interface. It panics as a Store cannot be cache wrapped.
func (*Store) CacheWrapWithTrace ¶
CacheWrapWithTrace implements the KVStore interface. It panics as a Store cannot be cache wrapped.
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) ReverseIterator ¶
ReverseIterator implements the KVStore interface. It delegates the ReverseIterator call the to the parent KVStore.