tracekv

package
v0.31.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2019 License: Apache-2.0 Imports: 5 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 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

func NewStore(parent types.KVStore, writer io.Writer, tc types.TraceContext) *Store

NewStore returns a reference to a new traceKVStore given a parent KVStore implementation and a buffered writer.

func (*Store) CacheWrap

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

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

func (*Store) CacheWrapWithTrace

func (tkv *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 (tkv *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 (tkv *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 (tkv *Store) GetStoreType() types.StoreType

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

func (*Store) Has

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

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

func (*Store) Iterator

func (tkv *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 (tkv *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 (tkv *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