eventhandler

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

This section is empty.

Types

type DeletionStartedHandler

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

DeletionStartedHandler handles the DeploymentDeletionStarted event, it performs resource cleanup for the deletion of deployment

func NewDeletionHandler

func NewDeletionHandler(portsDependency ports.Ports) DeletionStartedHandler

NewDeletionHandler ...

type EventHandlers

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

EventHandlers ...

func NewEventHandlers

func NewEventHandlers(portsDependency ports.Ports, whitelistCIDRs []string) EventHandlers

NewEventHandlers ...

func (EventHandlers) DeploymentDeletionStarted

func (h EventHandlers) DeploymentDeletionStarted(deletionResult service.DeploymentDeletionResult, sink ports.OutgoingEventSink)

DeploymentDeletionStarted handles service.DeploymentDeletionStarted (emitted by metadata service), and perform resource cleanup on the deployment

func (EventHandlers) EventRunPreflightSucceeded

func (h EventHandlers) EventRunPreflightSucceeded(tid common.TransactionID, result deploymentevents.RunPreflightResult, sink ports.OutgoingEventSink)

EventRunPreflightSucceeded ...

func (EventHandlers) EventStartRunRequested

func (h EventHandlers) EventStartRunRequested(tid common.TransactionID, request deploymentevents.StartRunRequest, sink ports.OutgoingEventSink)

EventStartRunRequested ...

func (EventHandlers) WorkflowFailedEvent

func (h EventHandlers) WorkflowFailedEvent(failed awmclient.WorkflowFailed, sink ports.OutgoingEventSink)

WorkflowFailedEvent ...

func (EventHandlers) WorkflowSucceededEvent

func (h EventHandlers) WorkflowSucceededEvent(succeeded awmclient.WorkflowSucceeded, sink ports.OutgoingEventSink)

WorkflowSucceededEvent ...

type PreflightSucceededHandler

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

PreflightSucceededHandler handles the success result of preflight stage for a Terraform run. And it starts the execution stage for the run.

func NewPreflightSucceededHandler

func NewPreflightSucceededHandler(portsDependency ports.Ports) PreflightSucceededHandler

NewPreflightSucceededHandler ...

type SpecificPurposeWorkflowHandler

type SpecificPurposeWorkflowHandler interface {
	HandleWorkflowSuccess(tid common.TransactionID, event awmclient.WorkflowSucceeded, workflow types.DeploymentWorkflow, sink ports.OutgoingEventSink)
	HandleWorkflowFailure(tid common.TransactionID, event awmclient.WorkflowFailed, workflow types.DeploymentWorkflow, sink ports.OutgoingEventSink)
}

SpecificPurposeWorkflowHandler is handler that handles workflow of a specific purpose. Note the handler will return nil when there is no response event generated.

type StartRunHandler

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

StartRunHandler handles the StartRunRequest. It validates the request to see if the run can be started. If the run CAN be started, then it proceeds to the preflight stage, for which a preflight workflow will be launched. If run CANNOT be started (that is if any error arise in the handler), then run is fail to start, which means from the perspective of outside of deployment context (outside of all deployment services), the run is not created and does not exists.

func NewStartRunHandler

func NewStartRunHandler(portsDependency ports.Ports, whitelistCIDRs []string) StartRunHandler

NewStartRunHandler ...

type WorkflowFailedHandler

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

WorkflowFailedHandler handles workflow failed event, and dispatch it to another handler based on its purpose

func NewWorkflowFailedHandler

func NewWorkflowFailedHandler(dependencies ports.Ports) WorkflowFailedHandler

NewWorkflowFailedHandler ...

func (WorkflowFailedHandler) Handle

Handle ...

type WorkflowSucceededHandler

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

WorkflowSucceededHandler handles workflow succeeded event, and dispatch it to another handler based on its purpose

func NewWorkflowSucceededHandler

func NewWorkflowSucceededHandler(dependencies ports.Ports) WorkflowSucceededHandler

NewWorkflowSucceededHandler ...

func (WorkflowSucceededHandler) Handle

Handle ...

Jump to

Keyboard shortcuts

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