Documentation
¶
Overview ¶
Package shutdown implements the `rad shutdown` command, which backs up all durable Radius state (PostgreSQL control-plane databases and Terraform state Secrets) for the current workspace to a state archive. It is the counterpart of `rad startup`.
The command does not delete clusters or uninstall Radius; cluster lifecycle is the caller's responsibility. This keeps the command usable in any context and independent of any particular workspace kind.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Runner ¶
type Runner struct {
ConfigHolder *framework.ConfigHolder
Output output.Interface
Workspace *workspaces.Workspace
StateClient StateBackupClient
// Archive is the durable state archive that state is committed to. Tests inject a mock.
Archive statearchive.Archive
}
Runner is the runner implementation for the `rad shutdown` command.
type StateBackupClient ¶
type StateBackupClient interface {
// BackupDatabases dumps the control-plane PostgreSQL databases into stateDir.
BackupDatabases(ctx context.Context, kubeContext, namespace, stateDir string) error
// BackupTerraform exports the Terraform state Secrets into stateDir.
BackupTerraform(ctx context.Context, kubeContext, namespace, stateDir string) error
}
StateBackupClient backs up the durable Radius state for a Kubernetes context. It wraps the pgbackup and tfstate packages so the command can be unit tested without a cluster.
func NewStateBackupClient ¶
func NewStateBackupClient() StateBackupClient
NewStateBackupClient returns the production StateBackupClient.