Documentation ¶
Index ¶
- Constants
- type Deployment
- type DeploymentDeletionCleanupResult
- type DeploymentDeletionCleanupStarted
- type DeploymentRunStatusUpdated
- type ProviderCredentialPair
- type Run
- type RunExecutionFailed
- type RunExecutionRequested
- type RunExecutionStarted
- type RunExecutionSucceeded
- type RunPreflightResult
- type RunPreflightStartFailed
- type RunPreflightStarted
- type StartRunRequest
Constants ¶
const EventDeploymentDeletionCleanupFailed common.EventType = common.EventTypePrefix + "DeploymentDeletionCleanupFailed"
EventDeploymentDeletionCleanupFailed is event type that indicates the cleanup for deletion has failed.
const EventDeploymentDeletionCleanupStarted common.EventType = common.EventTypePrefix + "DeploymentDeletionCleanupStarted"
EventDeploymentDeletionCleanupStarted is event type that indicates the cleanup for deletion has started.
const EventDeploymentDeletionCleanupSucceeded common.EventType = common.EventTypePrefix + "DeploymentDeletionCleanupSucceeded"
EventDeploymentDeletionCleanupSucceeded is event type that indicates the cleanup for deletion has succeeded.
const EventDeploymentRunStatusUpdated common.EventType = common.EventTypePrefix + "DeploymentRunStatusUpdated"
EventDeploymentRunStatusUpdated ...
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.
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.
const EventRunExecutionStarted common.EventType = common.EventTypePrefix + "RunExecutionStarted"
EventRunExecutionStarted is event type that is a request for starting execution stage.
const EventRunExecutionSucceeded common.EventType = common.EventTypePrefix + "RunExecutionSucceeded"
EventRunExecutionSucceeded is event type that indicates the execution stage has succeeded
const EventRunPreflightFailed common.EventType = common.EventTypePrefix + "RunPreflightFailed"
EventRunPreflightFailed is event type that indicate preflight stage of the run has failed
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.
const EventRunPreflightStarted common.EventType = common.EventTypePrefix + "RunPreflightStarted"
EventRunPreflightStarted is event that indicates the preflight stage has started.
const EventRunPreflightSucceeded common.EventType = common.EventTypePrefix + "RunPreflightSucceeded"
EventRunPreflightSucceeded is event type that indicate preflight stage of the run has succeeded
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 ¶
func (d DeploymentRunStatusUpdated) EventType() common.EventType
EventType ...
func (DeploymentRunStatusUpdated) ToCloudEvent ¶
func (d DeploymentRunStatusUpdated) ToCloudEvent(source string) (cloudevents.Event, error)
ToCloudEvent ...
func (DeploymentRunStatusUpdated) Transaction ¶
func (d DeploymentRunStatusUpdated) Transaction() common.TransactionID
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.