snapshot

package
v1.14.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MPL-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateCmd

func NewCreateCmd(globalFlags *flags.GlobalFlags) *cobra.Command

func NewDeleteCmd

func NewDeleteCmd(globalFlags *flags.GlobalFlags) *cobra.Command

func NewListCmd

func NewListCmd(globalFlags *flags.GlobalFlags) *cobra.Command

func NewRestoreCmd

func NewRestoreCmd(globalFlags *flags.GlobalFlags) *cobra.Command

func NewSnapshotCmd

func NewSnapshotCmd(globalFlags *flags.GlobalFlags) *cobra.Command

Types

type CreateCmd

type CreateCmd struct {
	*flags.GlobalFlags

	Registry string
	Message  string
}

func (*CreateCmd) Run

func (cmd *CreateCmd) Run(ctx context.Context, devsyConfig *config.Config, args []string) error

The manifest is pushed last so a snapshot only becomes visible once every blob it references already exists in the registry.

The workspace is not quiesced (stopped/paused) while its filesystem is committed and its volumes are read: the two are captured back-to-back without a consistency window, so a write straddling both (e.g. a build tool that writes to the container filesystem and a bind-mounted volume in the same operation) can be observed half-applied in the resulting snapshot. This is an accepted limitation, not an oversight: volumes are read directly off host bind mount paths rather than through the container (see pushVolumes), so stopping the container would not by itself close this window, and would also interrupt the workspace's running agent/SSH session for a `snapshot create` that today runs against a live workspace.

type DeleteCmd

type DeleteCmd struct {
	*flags.GlobalFlags
}

func (*DeleteCmd) Run

func (cmd *DeleteCmd) Run(ctx context.Context, ref string) error

type ListCmd

type ListCmd struct {
	*flags.GlobalFlags

	Registry string
}

func (*ListCmd) Run

func (cmd *ListCmd) Run(ctx context.Context, devsyConfig *config.Config, args []string) error

type RestoreCmd

type RestoreCmd struct {
	*flags.GlobalFlags

	WorkspaceID  string
	ProviderName string
}

func (*RestoreCmd) Run

func (cmd *RestoreCmd) Run(
	ctx context.Context,
	devsyConfig *config.Config,
	snapshotRef string,
) error

Run reuses the same creation/start path `devsy up` uses (pkg/workspace.Resolve plus the agent run), with the workspace's source pinned to the snapshot ref and the devcontainer image pinned to the snapshot's committed filesystem layer, so the snapshot volume restore wired into container setup (cmd/internal/agentcontainer/setup.go) runs unchanged.

Jump to

Keyboard shortcuts

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