cosmos-sdk: github.com/cosmos/cosmos-sdk/store/tracekv Index | Files

package tracekv

import "github.com/cosmos/cosmos-sdk/store/tracekv"

Index

Package Files

store.go

type Store Uses

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 Uses

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 Uses

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

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

func (*Store) CacheWrapWithTrace Uses

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 Uses

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 Uses

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 Uses

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

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

func (*Store) Has Uses

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

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

func (*Store) Iterator Uses

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 Uses

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 Uses

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.

Package tracekv imports 5 packages (graph) and is imported by 10 packages. Updated 2019-10-18. Refresh now. Tools for package owners.