Documentation ¶
Index ¶
- type Queryable
- type Store
- func (rs *Store) CacheMultiStore() types.CacheMultiStore
- func (rs *Store) CacheWrap() types.CacheWrap
- func (rs *Store) GetCommitKVStore(key types.StoreKey) types.CommitKVStore
- func (rs *Store) GetCommitStore(key types.StoreKey) types.CommitStore
- func (rs *Store) GetKVStore(key types.StoreKey) types.KVStore
- func (rs *Store) GetStore(key types.StoreKey) types.Store
- func (rs *Store) GetStoreType() types.StoreType
- func (rs *Store) LoadStores() error
- func (rs *Store) MountStoreWithDB(key types.StoreKey, typ types.StoreType, db dbm.DB)
- func (rs *Store) Query(req abci.RequestQuery) abci.ResponseQuery
- func (rs *Store) SetTracer(w io.Writer) *Store
- func (rs *Store) SetTracingContext(tc types.TraceContext) *Store
- func (rs *Store) TracingEnabled() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queryable ¶
type Queryable interface {
Query(abci.RequestQuery) abci.ResponseQuery
}
Queryable allows a Store to expose internal state to the abci.Query interface. Multistore can route requests to the proper Store.
This is an optional, but useful extension to any CommitStore
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CacheMultiStore ¶
func (rs *Store) CacheMultiStore() types.CacheMultiStore
CacheMultiStore cache-wraps the multi-store and returns a CacheMultiStore. It implements the MultiStore interface.
func (*Store) GetCommitKVStore ¶
func (rs *Store) GetCommitKVStore(key types.StoreKey) types.CommitKVStore
GetCommitKVStore returns a mounted CommitKVStore for a given StoreKey. If the store is wrapped in an inter-block cache, it will be unwrapped before returning.
func (*Store) GetCommitStore ¶
func (rs *Store) GetCommitStore(key types.StoreKey) types.CommitStore
GetCommitStore returns a mounted CommitStore for a given StoreKey. If the store is wrapped in an inter-block cache, it will be unwrapped before returning.
func (*Store) GetKVStore ¶
GetKVStore returns a mounted KVStore for a given StoreKey. If tracing is enabled on the KVStore, a wrapped TraceKVStore will be returned with the root store's tracer, otherwise, the original KVStore will be returned.
NOTE: The returned KVStore may be wrapped in an inter-block cache if it is set on the root store.
func (*Store) GetStore ¶
GetStore returns a mounted Store for a given StoreKey. If the StoreKey does not exist, it will panic. If the Store is wrapped in an inter-block cache, it will be unwrapped prior to being returned.
TODO: This isn't used directly upstream. Consider returning the Store as-is instead of unwrapping.
func (*Store) GetStoreType ¶
GetStoreType implements Store.
func (*Store) LoadStores ¶
func (*Store) MountStoreWithDB ¶
MountStoreWithDB implements CommitMultiStore.
func (*Store) Query ¶
func (rs *Store) Query(req abci.RequestQuery) abci.ResponseQuery
Query calls substore.Query with the same `req` where `req.Path` is modified to remove the substore prefix. Ie. `req.Path` here is `/<substore>/<path>`, and trimmed to `/<path>` for the substore. TODO: add proof for `multistore -> substore`.
func (*Store) SetTracer ¶
SetTracer sets the tracer for the MultiStore that the underlying stores will utilize to trace operations. A MultiStore is returned.
func (*Store) SetTracingContext ¶
func (rs *Store) SetTracingContext(tc types.TraceContext) *Store
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.