resourcedeletion

package
v0.0.0-...-e28bd7b Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartResourceCleanup

func StartResourceCleanup(awm ports.ArgoWorkflowMediator, keySrc ports.KeySrc, data ResourceCleanupPrerequisite) (awmProvider awmclient.AWMProvider, wfName string, err error)

StartResourceCleanup creates a workflow that will clean up the resources provisioned by the deployment.

Types

type PrerequisiteGatherer

type PrerequisiteGatherer struct {
	// contains filtered or unexported fields
}

PrerequisiteGatherer gathers prerequisite for launching deletion workflow that cleans up resources for deployment.

func NewPrerequisiteGatherer

func NewPrerequisiteGatherer(runStorage ports.TFRunStorage, credMS ports.CredentialMicroservice, metadataSvc ports.DeploymentMetadataService) PrerequisiteGatherer

NewPrerequisiteGatherer ...

func (PrerequisiteGatherer) Gather

func (gatherer PrerequisiteGatherer) Gather(actor types.Actor, deploymentID common.ID) (ResourceCleanupPrerequisite, error)

Gather gathers prerequisite

type ResourceCleanupPrerequisite

type ResourceCleanupPrerequisite struct {
	//Deployment service.Deployment
	Actor types.Actor
	//Template  service.Template
	LastRun   types.DeploymentRun
	CloudCred *service.CredentialModel
	GitCred   *service.CredentialModel
}

ResourceCleanupPrerequisite is data that is required for starting the resource cleanup.

type WorkflowHandler

type WorkflowHandler struct {
	// contains filtered or unexported fields
}

WorkflowHandler handles result of deletion workflow (workflow that cleanup resource)

func NewWorkflowHandler

func NewWorkflowHandler(dependencies ports.Ports) WorkflowHandler

NewWorkflowHandler ...

func (WorkflowHandler) HandleWorkflowFailure

func (h WorkflowHandler) HandleWorkflowFailure(tid common.TransactionID, event awmclient.WorkflowFailed, workflow types.DeploymentWorkflow, sink ports.OutgoingEventSink)

HandleWorkflowFailure handles failed workflow.

func (WorkflowHandler) HandleWorkflowSuccess

HandleWorkflowSuccess handles success workflow. Success workflow means that the resource has been cleaned up successfully.

Jump to

Keyboard shortcuts

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