deploymentevents

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const EventDeploymentDeletionCleanupFailed common.EventType = common.EventTypePrefix + "DeploymentDeletionCleanupFailed"

EventDeploymentDeletionCleanupFailed is event type that indicates the cleanup for deletion has failed.

View Source
const EventDeploymentDeletionCleanupStarted common.EventType = common.EventTypePrefix + "DeploymentDeletionCleanupStarted"

EventDeploymentDeletionCleanupStarted is event type that indicates the cleanup for deletion has started.

View Source
const EventDeploymentDeletionCleanupSucceeded common.EventType = common.EventTypePrefix + "DeploymentDeletionCleanupSucceeded"

EventDeploymentDeletionCleanupSucceeded is event type that indicates the cleanup for deletion has succeeded.

View Source
const EventDeploymentRunStatusUpdated common.EventType = common.EventTypePrefix + "DeploymentRunStatusUpdated"

EventDeploymentRunStatusUpdated ...

View Source
const EventRunExecutionFailed common.EventType = common.EventTypePrefix + "RunExecutionFailed"

EventRunExecutionFailed is event type that indicates the execution stage of run has failed, OR fail to start the execution stage.

View Source
const EventRunExecutionRequested common.EventType = common.EventTypePrefix + "RunExecutionRequested"

EventRunExecutionRequested is event type to request for starting the execution stage. This is currently not used, since EventRunPreflightSucceeded will trigger the start of execution-stage. TODO this is reserved for situation when one needed to manually trigger the execution stage.

View Source
const EventRunExecutionStarted common.EventType = common.EventTypePrefix + "RunExecutionStarted"

EventRunExecutionStarted is event type that is a request for starting execution stage.

View Source
const EventRunExecutionSucceeded common.EventType = common.EventTypePrefix + "RunExecutionSucceeded"

EventRunExecutionSucceeded is event type that indicates the execution stage has succeeded

View Source
const EventRunPreflightFailed common.EventType = common.EventTypePrefix + "RunPreflightFailed"

EventRunPreflightFailed is event type that indicate preflight stage of the run has failed

View Source
const EventRunPreflightStartFailed common.EventType = common.EventTypePrefix + "RunPreflightStartFailed"

EventRunPreflightStartFailed is even type that indicates the preflight stage of a run cannot be started or failed to be started.

View Source
const EventRunPreflightStarted common.EventType = common.EventTypePrefix + "RunPreflightStarted"

EventRunPreflightStarted is event that indicates the preflight stage has started.

View Source
const EventRunPreflightSucceeded common.EventType = common.EventTypePrefix + "RunPreflightSucceeded"

EventRunPreflightSucceeded is event type that indicate preflight stage of the run has succeeded

View Source
const EventStartRunRequested common.EventType = common.EventTypePrefix + "StartRunRequested"

EventStartRunRequested is the event type for StartRunRequest

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

type Deployment struct {
	ID               common.ID                       `json:"id"`
	CreatedBy        deploymentcommon.Creator        `json:",inline"`
	TemplateType     service.TemplateTypeName        `json:"type"`
	Workspace        common.ID                       `json:"workspace"`
	PrimaryProvider  common.ID                       `json:"primary_provider"`
	CurrentStatus    service.DeploymentStatus        `json:"current_status"`
	PendingStatus    service.DeploymentPendingStatus `json:"pending_status"`
	CloudCredentials []ProviderCredentialPair        `json:"cloud_creds"`
	GitCredentialID  string                          `json:"git_cred"`
}

Deployment is deployment in the context/perspective of starting a run.

type DeploymentDeletionCleanupResult

type DeploymentDeletionCleanupResult struct {
	service.Session `json:",inline"`
	TemplateType    service.TemplateTypeName `json:"template_type"`
	Deployment      common.ID                `json:"deployment"`
}

DeploymentDeletionCleanupResult is the event body for EventDeploymentDeletionCleanupFailed and EventDeploymentDeletionCleanupSucceeded.

type DeploymentDeletionCleanupStarted

type DeploymentDeletionCleanupStarted struct {
	service.Session `json:",inline"`
	TemplateType    service.TemplateTypeName `json:"template_type"`
	Deployment      common.ID                `json:"deployment"`
}

DeploymentDeletionCleanupStarted is the event body for EventDeploymentDeletionCleanupStarted

type DeploymentRunStatusUpdated

type DeploymentRunStatusUpdated struct {
	service.Session `json:",inline"`
	Deployment      common.ID                            `json:"deployment"`
	Run             common.ID                            `json:"run"`
	Status          deploymentcommon.DeploymentRunStatus `json:"status"`
	OldStatus       deploymentcommon.DeploymentRunStatus `json:"old_status"`
	// For outgoing purpose
	TransactionID common.TransactionID `json:"-"`
}

DeploymentRunStatusUpdated is event emitted when the status of a deployment run is updated.

func (DeploymentRunStatusUpdated) EventType

EventType ...

func (DeploymentRunStatusUpdated) ToCloudEvent

func (d DeploymentRunStatusUpdated) ToCloudEvent(source string) (cloudevents.Event, error)

ToCloudEvent ...

func (DeploymentRunStatusUpdated) Transaction

Transaction ...

type ProviderCredentialPair

type ProviderCredentialPair struct {
	Provider     common.ID `json:"provider"`
	CredentialID string    `json:"credential"`
}

ProviderCredentialPair is an association between a cloud credential and a provider

type Run

type Run struct {
	ID                common.ID                            `json:"id"`
	CreatedBy         deploymentcommon.Creator             `json:",inline"`
	CreatedAt         time.Time                            `json:"created_at"`
	TemplateID        common.ID                            `json:"template"`
	TemplateVersionID common.ID                            `json:"template_version"`
	RequestParameters service.DeploymentParameterValues    `json:"parameters"`
	Status            deploymentcommon.DeploymentRunStatus `json:"status"`
}

Run is run in the context/perspective of starting it.

type RunExecutionFailed

type RunExecutionFailed struct {
	service.Session `json:",inline"`
	TemplateType    service.TemplateTypeName             `json:"template_type"`
	Deployment      common.ID                            `json:"deployment"`
	Run             common.ID                            `json:"run"`
	StateView       deploymentcommon.DeploymentStateView `json:"state_view"`
}

RunExecutionFailed is the event body for EventRunExecutionFailed.

type RunExecutionRequested

type RunExecutionRequested commonRunResultEventBody

RunExecutionRequested is a request to start the execution stage of a run, it is the event body for EventRunExecutionRequested.

type RunExecutionStarted

type RunExecutionStarted commonRunResultEventBody

RunExecutionStarted is the event body for EventRunExecutionStarted

type RunExecutionSucceeded

type RunExecutionSucceeded struct {
	service.Session `json:",inline"`
	TemplateType    service.TemplateTypeName             `json:"template_type"`
	Deployment      common.ID                            `json:"deployment"`
	Run             common.ID                            `json:"run"`
	StateView       deploymentcommon.DeploymentStateView `json:"state_view"`
}

RunExecutionSucceeded is the event body for EventRunExecutionSucceeded.

type RunPreflightResult

type RunPreflightResult commonRunResultEventBody

RunPreflightResult is an event that indicates the preflight stage has completed, it is the event body for EventRunPreflightSucceeded or EventRunPreflightFailed.

type RunPreflightStartFailed

type RunPreflightStartFailed commonRunResultEventBody

RunPreflightStartFailed is an event body for EventRunPreflightStartFailed.

type RunPreflightStarted

type RunPreflightStarted struct {
	service.Session `json:",inline"`
	TemplateType    service.TemplateTypeName              `json:"template_type"`
	Deployment      common.ID                             `json:"deployment"`
	Run             common.ID                             `json:"run"`
	Parameters      deploymentcommon.DeploymentParameters `json:"parameters"`
}

RunPreflightStarted is an event body for EventRunPreflightStarted.

type StartRunRequest

type StartRunRequest struct {
	service.Session `json:",inline"`
	Deployment      Deployment `json:"deployment"`
	Run             Run        `json:"run"`
}

StartRunRequest is a request to start a run.

Jump to

Keyboard shortcuts

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