import "github.com/cosmos/cosmos-sdk/store/cachemulti"
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( store types.KVStore, stores map[types.StoreKey]types.CacheWrapper, keys map[string]types.StoreKey, traceWriter io.Writer, traceContext types.TraceContext, ) 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( db dbm.DB, stores map[types.StoreKey]types.CacheWrapper, keys map[string]types.StoreKey, traceWriter io.Writer, traceContext types.TraceContext, ) Store
NewStore creates a new Store object from a mapping of store keys to CacheWrapper objects. Each CacheWrapper store is a branched store.
func (cms Store) CacheMultiStore() types.CacheMultiStore
Implements MultiStore.
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).
Implements CacheWrapper.
CacheWrapWithTrace implements the CacheWrapper interface.
GetKVStore returns an underlying KVStore by key.
GetStore returns an underlying Store by key.
GetStoreType returns the type of the store.
SetTracer sets the tracer for the MultiStore that the underlying stores will utilize to trace operations. A MultiStore is returned.
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.
TracingEnabled returns if tracing is enabled for the MultiStore.
Write calls Write on each underlying store.
Package cachemulti imports 6 packages (graph) and is imported by 4 packages. Updated 2021-01-08. Refresh now. Tools for package owners.