snapshot

package
v0.52.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 18 Imported by: 237

Documentation

Index

Constants

View Source
const SnapshotFileName = "_snapshot"

Variables

View Source
var ListSnapshotsCmd = &cobra.Command{
	Use:   "list",
	Short: "List local snapshots",
	RunE: func(cmd *cobra.Command, args []string) error {
		viper := client.GetViperFromCmd(cmd)
		snapshotStore, err := server.GetSnapshotStore(viper)
		if err != nil {
			return err
		}
		snapshots, err := snapshotStore.List()
		if err != nil {
			return fmt.Errorf("failed to list snapshots: %w", err)
		}
		for _, snapshot := range snapshots {
			cmd.Println("height:", snapshot.Height, "format:", snapshot.Format, "chunks:", snapshot.Chunks)
		}

		return nil
	},
}

ListSnapshotsCmd returns the command to list local snapshots

Functions

func Cmd

Cmd returns the snapshots group command

func DeleteSnapshotCmd

func DeleteSnapshotCmd() *cobra.Command

func DumpArchiveCmd

func DumpArchiveCmd() *cobra.Command

DumpArchiveCmd returns a command to dump the snapshot as portable archive format

func ExportSnapshotCmd

func ExportSnapshotCmd[T servertypes.Application](appCreator servertypes.AppCreator[T]) *cobra.Command

ExportSnapshotCmd returns a command to take a snapshot of the application state

func LoadArchiveCmd

func LoadArchiveCmd() *cobra.Command

LoadArchiveCmd load a portable archive format snapshot into snapshot store

func RestoreSnapshotCmd

func RestoreSnapshotCmd[T servertypes.Application](appCreator servertypes.AppCreator[T]) *cobra.Command

RestoreSnapshotCmd returns a command to restore a snapshot

Types

This section is empty.

Jump to

Keyboard shortcuts

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