listenkv

package
v0.0.0-...-69704c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2023 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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

func (s *Store) CacheWrap() types.CacheWrap

CacheWrap implements the KVStore interface. It panics as a Store cannot be cache wrapped.

func (*Store) CacheWrapWithListeners

func (s *Store) CacheWrapWithListeners(_ types.StoreKey, _ []types.WriteListener) types.CacheWrap

CacheWrapWithListeners implements the KVStore interface. It panics as a Store cannot be cache wrapped.

func (*Store) CacheWrapWithTrace

func (s *Store) CacheWrapWithTrace(_ io.Writer, _ types.TraceContext) types.CacheWrap

CacheWrapWithTrace implements the KVStore interface. It panics as a Store cannot be cache wrapped.

func (*Store) Delete

func (s *Store) Delete(key []byte)

Delete implements the KVStore interface. It traces a write operation and delegates the Delete call to the parent KVStore.

func (*Store) Get

func (s *Store) Get(key []byte) []byte

Get implements the KVStore interface. It traces a read operation and delegates a Get call to the parent KVStore.

func (*Store) GetStoreType

func (s *Store) GetStoreType() types.StoreType

GetStoreType implements the KVStore interface. It returns the underlying KVStore type.

func (*Store) Has

func (s *Store) Has(key []byte) bool

Has implements the KVStore interface. It delegates the Has call to the parent KVStore.

func (*Store) Iterator

func (s *Store) Iterator(start, end []byte) types.Iterator

Iterator implements the KVStore interface. It delegates the Iterator call the to the parent KVStore.

func (*Store) ReverseIterator

func (s *Store) ReverseIterator(start, end []byte) types.Iterator

ReverseIterator implements the KVStore interface. It delegates the ReverseIterator call the to the parent KVStore.

func (*Store) Set

func (s *Store) Set(key []byte, value []byte)

Set implements the KVStore interface. It traces a write operation and delegates the Set call to the parent KVStore.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL