storage

package
v0.2600.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package storage implements the storage sub-commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(parentCmd *cobra.Command)

Register registers the client sub-command and all of its children.

Types

type ConsensusStatus added in v0.2600.0

type ConsensusStatus struct {
	// StateDB is the status of the consensus state db (Merkelized key-value store).
	StateDB DBStatus `json:"state_db"`
	// BlockHistory is the status of the consensus block store.
	BlockHistory DBStatus `json:"block_history"`
}

ConsensusStatus summarizes the state of the consensus databases.

type DBStatus added in v0.2600.0

type DBStatus struct {
	// Ok is true when the db exists and there was no error inspecting it.
	Ok bool `json:"ok"`
	// LatestVersion is the version of the most recent item stored in the corresponding db.
	LatestVersion uint64 `json:"latest_version"`
	// LastRetainedVersion is the version of the oldest item stored in the corresponding db.
	LastRetainedVersion uint64 `json:"last_retained_version"`
}

DBStatus is a database status.

type RuntimeStatus added in v0.2600.0

type RuntimeStatus struct {
	// StateDB is the status of the runtime state db (Merkelized key-value store).
	StateDB DBStatus `json:"state_db"`
	// LightHistory is the status of the runtime light history.
	LightHistory DBStatus `json:"light_history"`
}

RuntimeStatus summarizes the state of the runtime databases.

type Status added in v0.2600.0

type Status struct {
	// Consensus is the consensus part of the status.
	Consensus ConsensusStatus `json:"consensus"`
	// Runtimes is the runtimes part of the status.
	Runtimes map[common.Namespace]RuntimeStatus `json:"runtimes"`
}

Status contains results of inspecting all of the node's databases.

func Inspect added in v0.2600.0

func Inspect(ctx context.Context, dataDir string, runtimes []common.Namespace) Status

Inspect inspects node's databases and returns a corresponding storage Status.

The node should not be running once this command is called.

Jump to

Keyboard shortcuts

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