snapshot

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRemoteNotSupported is returned for known remote schemes (s3://, oras://).
	ErrRemoteNotSupported = errors.New("remote destinations are not yet supported — coming soon")
	// ErrUnknownScheme is returned for unrecognized URL schemes.
	ErrUnknownScheme = errors.New("unrecognized destination scheme")
)

Functions

func SaveLocal added in v0.9.0

func SaveLocal(ctx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, exporter StateExporter, host, dest string, sink output.Sink) error

func SavePod added in v0.9.0

func SavePod(ctx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, saver PodSaver, host, podName, authToken string, sink output.Sink) error

Types

type Destination added in v0.9.0

type Destination struct {
	Kind  DestinationKind
	Value string
}

Destination is the parsed result of a user-supplied snapshot destination. For KindLocal, Value is an absolute local file path with a .zip extension. For KindPod, Value is the validated pod name (without the "pod:" prefix).

func ParseDestination

func ParseDestination(dest string, now time.Time) (Destination, error)

ParseDestination resolves a user-supplied destination to a local path (KindLocal) or validated pod name (KindPod).

type DestinationKind added in v0.9.0

type DestinationKind int

DestinationKind distinguishes local file paths from remote pod destinations.

const (
	KindLocal DestinationKind = iota
	KindPod
)

type PodSaveResult added in v0.9.0

type PodSaveResult struct {
	Version  int
	Services []string
	Size     int64
}

PodSaveResult holds the metadata returned by the platform after a successful pod save.

type PodSaver added in v0.9.0

type PodSaver interface {
	SavePodSnapshot(ctx context.Context, host, podName, authToken string) (PodSaveResult, error)
}

PodSaver triggers a remote pod snapshot save on the running LocalStack instance.

type StateExporter

type StateExporter interface {
	ExportState(ctx context.Context, host string, dst io.Writer) error
}

StateExporter retrieves state from the running LocalStack instance.

Jump to

Keyboard shortcuts

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