Documentation
¶
Overview ¶
Package clusterdelete orchestrates cluster destroy workflows across provider implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(ctx context.Context, opts DeleteOptions) error
Delete runs the provider cleanup workflow and then destroys managed OpenTofu/Terraform resources.
func FormatInstances ¶
FormatInstances formats provider instances for human-readable status and confirmation messages.
Types ¶
type ConfirmFunc ¶
ConfirmFunc asks the user to confirm a destructive action.
type DeleteOptions ¶
type DeleteOptions struct {
ClusterConfig *clusterconfig.ClusterConfig
StackDir string
Executor Executor
Provider Provider
AutoApprove bool
Confirm ConfirmFunc
Status StatusFunc
OutputTimeout time.Duration
DestroyTimeout time.Duration
}
DeleteOptions controls the cluster delete workflow.
type Executor ¶
type Executor interface {
OutputJSON(ctx context.Context, dir string) ([]byte, error)
Destroy(ctx context.Context, dir string, autoApprove bool) error
}
Executor provides Terraform outputs and destroy behavior for cluster delete.
type Provider ¶
type Provider interface {
Prepare(ctx context.Context, cfg *clusterconfig.ClusterConfig, outputs []byte) error
ScaleManagedGroupsToZero(ctx context.Context) error
WaitForManagedInstancesGone(ctx context.Context) error
RemainingManagedInstances(ctx context.Context) ([]Instance, error)
TerminateInstances(ctx context.Context, instances []Instance) error
ListTaggedInstances(ctx context.Context, managedOnly bool) ([]Instance, error)
ClusterID() string
}
Provider performs provider-specific cleanup before and after destroy.
type StatusFunc ¶
type StatusFunc func(message string)
StatusFunc reports delete workflow status to the caller.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package aws implements AWS-specific cluster destroy cleanup for the clusterdelete package.
|
Package aws implements AWS-specific cluster destroy cleanup for the clusterdelete package. |
|
Package google will contain the Google Cloud cluster delete provider implementation.
|
Package google will contain the Google Cloud cluster delete provider implementation. |
Click to show internal directories.
Click to hide internal directories.