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 holds many cache-wrapped stores. Implements MultiStore. NOTE: a Store (and MultiStores in general) should never expose the keys for the substores.
func NewFromStores ¶
func (Store) Checkpoint ¶
func (cms Store) Checkpoint()
Checkpoint snapshots each sub-store's cache state.
Every substore arrives via store.CacheWrap() in NewFromStores, which always returns a *cache.cacheStore (every CacheWrap implementation in-tree delegates to cache.New). *cacheStore declares types.Checkpointable via a compile-time assertion, so the type assertions below are safe today; if a future store's CacheWrap returns something else, the panic is traceable to the missing interface rather than a bare anonymous-interface mismatch.
func (Store) HasCheckpoint ¶
HasCheckpoint returns true if any sub-store has an active checkpoint.
func (Store) MultiCacheWrap ¶
func (cms Store) MultiCacheWrap() types.MultiStore
Implements MultiStore.
func (Store) MultiWrite ¶
func (cms Store) MultiWrite()
MultiWrite calls Write on each underlying store.
func (Store) WriteCheckpoint ¶
func (cms Store) WriteCheckpoint()
WriteCheckpoint restores each sub-store to its checkpoint state and flushes only the checkpointed entries to the parent.