Documentation ¶
Index ¶
- Constants
- Variables
- func Cmd(appCreator servertypes.AppCreator) *cobra.Command
- func DeleteSnapshotCmd() *cobra.Command
- func DumpArchiveCmd() *cobra.Command
- func ExportSnapshotCmd(appCreator servertypes.AppCreator) *cobra.Command
- func LoadArchiveCmd() *cobra.Command
- func RestoreSnapshotCmd(appCreator servertypes.AppCreator) *cobra.Command
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 { fmt.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 DumpArchiveCmd ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.