snapshot

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 1

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 {
		ctx := server.GetServerContextFromCmd(cmd)
		snapshotStore, err := server.GetSnapshotStore(ctx.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

func Cmd(appCreator servertypes.AppCreator) *cobra.Command

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(appCreator servertypes.AppCreator) *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(appCreator servertypes.AppCreator) *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