types

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL