types

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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