{"modulePath":"github.com/devfile/devworkspace-operator","version":"v1.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package restore\n\nPackage restore defines library functions for restoring workspace data from backup images\n\n## Constants\n\n```go\nconst (\n\tWorkspaceRestoreContainerName = \"workspace-restore\"\n)\n```\n\n## Functions\n\n```go\nfunc GetWorkspaceRestoreInitContainer(\n\tctx context.Context,\n\tworkspace *common.DevWorkspaceWithConfig,\n\tk8sClient client.Client,\n\toptions Options,\n\tscheme *runtime.Scheme,\n\tlog logr.Logger,\n) (*corev1.Container, *corev1.Secret, error)\n```\nGetWorkspaceRestoreInitContainer creates an init container that restores workspace data from a backup image. The restore container uses the existing workspace-recovery.sh script to extract backup content.\n\n```go\nfunc IsWorkspaceRestoreRequested(workspace *dw.DevWorkspaceTemplateSpec) bool\n```\n\n## Types\n\n```go\ntype Options struct {\n\tImage      string\n\tPullPolicy corev1.PullPolicy\n\tResources  *corev1.ResourceRequirements\n\tEnv        []corev1.EnvVar\n}\n```\n\n","path":"github.com/devfile/devworkspace-operator/pkg/library/restore","name":"restore","synopsis":"Package restore defines library functions for restoring workspace data from backup images","isRedistributable":true}
