Documentation
¶
Index ¶
Constants ¶
View Source
const InitialHead = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SnapshotKVStore ¶
type SnapshotKVStore interface { Snapshotter // CurrentStore returns the underlying CacheKVStore that is currently // active (i.e., where reads and writes will be applied). CurrentStore() storetypes.CacheKVStore // Commit flushes all pending changes in the current store layer // down to its parent, making them permanent. Commit() }
SnapshotKVStore extends Snapshotter with CacheKVStore-specific operations.
It allows you to take/revert snapshots around KV-store operations, inspect the current active store, and commit changes.
type SnapshotMultiStore ¶
type SnapshotMultiStore interface { Snapshotter storetypes.CacheMultiStore }
SnapshotMultiStore extends Snapshotter and CacheMultiStore.
It allows snapshotting and rollback semantics on a multi-store (i.e., a collection of keyed sub-stores), leveraging the existing CacheMultiStore interface for basic store and cache management.
type Snapshotter ¶
type Snapshotter interface { // Snapshot captures the current state and returns a snapshot identifier. // The returned int can be used later to revert back to this exact state. Snapshot() int // RevertToSnapshot rolls back the state to the snapshot corresponding // to the given identifier. All changes made after that snapshot will be discarded. RevertToSnapshot(int) }
Snapshotter defines behavior for taking and reverting to state snapshots.
Click to show internal directories.
Click to hide internal directories.