Documentation ¶
Index ¶
- type Store
- func (cms Store) AddListeners(key types.StoreKey, listeners []types.WriteListener)
- func (cms Store) CacheMultiStore() types.CacheMultiStore
- func (cms Store) CacheMultiStoreWithVersion(_ int64) (types.CacheMultiStore, error)
- func (cms Store) CacheWrap() types.CacheWrap
- func (cms Store) CacheWrapWithListeners(_ types.StoreKey, _ []types.WriteListener) types.CacheWrap
- func (cms Store) CacheWrapWithTrace(_ io.Writer, _ types.TraceContext) types.CacheWrap
- func (cms Store) GetKVStore(key types.StoreKey) types.KVStore
- func (cms Store) GetStore(key types.StoreKey) types.Store
- func (cms Store) GetStoreType() types.StoreType
- func (cms Store) ListeningEnabled(key types.StoreKey) bool
- func (cms Store) SetTracer(w io.Writer) types.MultiStore
- func (cms Store) SetTracingContext(tc types.TraceContext) types.MultiStore
- func (cms Store) TracingEnabled() bool
- func (cms Store) Write()
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 holds many branched stores. Implements MultiStore. NOTE: a Store (and MultiStores in general) should never expose the keys for the substores.
func NewFromKVStore ¶
func NewFromKVStore( store types.KVStore, stores map[types.StoreKey]types.CacheWrapper, keys map[string]types.StoreKey, traceWriter io.Writer, traceContext types.TraceContext, listeners map[types.StoreKey][]types.WriteListener, ) Store
NewFromKVStore creates a new Store object from a mapping of store keys to CacheWrapper objects and a KVStore as the database. Each CacheWrapper store is a branched store.
func NewStore ¶
func NewStore( db dbm.DB, stores map[types.StoreKey]types.CacheWrapper, keys map[string]types.StoreKey, traceWriter io.Writer, traceContext types.TraceContext, listeners map[types.StoreKey][]types.WriteListener, ) Store
NewStore creates a new Store object from a mapping of store keys to CacheWrapper objects. Each CacheWrapper store is a branched store.
func (Store) AddListeners ¶ added in v0.60.1
func (cms Store) AddListeners(key types.StoreKey, listeners []types.WriteListener)
AddListeners adds listeners for a specific KVStore
func (Store) CacheMultiStore ¶
func (cms Store) CacheMultiStore() types.CacheMultiStore
Implements MultiStore.
func (Store) CacheMultiStoreWithVersion ¶ added in v0.60.1
func (cms Store) CacheMultiStoreWithVersion(_ int64) (types.CacheMultiStore, error)
CacheMultiStoreWithVersion implements the MultiStore interface. It will panic as an already cached multi-store cannot load previous versions.
TODO: The store implementation can possibly be modified to support this as it seems safe to load previous versions (heights).
func (Store) CacheWrapWithListeners ¶ added in v0.60.1
CacheWrapWithListeners implements the CacheWrapper interface.
func (Store) CacheWrapWithTrace ¶
CacheWrapWithTrace implements the CacheWrapper interface.
func (Store) GetKVStore ¶
GetKVStore returns an underlying KVStore by key.
func (Store) GetStoreType ¶
GetStoreType returns the type of the store.
func (Store) ListeningEnabled ¶ added in v0.60.1
ListeningEnabled returns if listening is enabled for a specific KVStore
func (Store) SetTracer ¶
func (cms Store) SetTracer(w io.Writer) types.MultiStore
SetTracer sets the tracer for the MultiStore that the underlying stores will utilize to trace operations. A MultiStore is returned.
func (Store) SetTracingContext ¶
func (cms Store) SetTracingContext(tc types.TraceContext) types.MultiStore
SetTracingContext updates the tracing context for the MultiStore by merging the given context with the existing context by key. Any existing keys will be overwritten. It is implied that the caller should update the context when necessary between tracing operations. It returns a modified MultiStore.
func (Store) TracingEnabled ¶
TracingEnabled returns if tracing is enabled for the MultiStore.