Documentation ¶
Index ¶
- Constants
- Variables
- func Cmd[T servertypes.Application](appCreator servertypes.AppCreator[T]) *cobra.Command
- func DeleteSnapshotCmd() *cobra.Command
- func DumpArchiveCmd() *cobra.Command
- func ExportSnapshotCmd[T servertypes.Application](appCreator servertypes.AppCreator[T]) *cobra.Command
- func LoadArchiveCmd() *cobra.Command
- func RestoreSnapshotCmd[T servertypes.Application](appCreator servertypes.AppCreator[T]) *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 { 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 ¶
func Cmd[T servertypes.Application](appCreator servertypes.AppCreator[T]) *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[T servertypes.Application](appCreator servertypes.AppCreator[T]) *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[T servertypes.Application](appCreator servertypes.AppCreator[T]) *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.