Documentation ¶
Index ¶
- type CommandEvent
- type Event
- type PayloadWithEvent
- type PipelineCancel
- type PipelineCancelOption
- type PipelineCanceled
- type PipelineCanceledOption
- type PipelineFail
- type PipelineFailOption
- func ForPipelineFinishedToPipelineFail(e *PipelineFinished, err error) PipelineFailOption
- func ForPipelineLoadedToPipelineFail(e *PipelineLoaded, err error) PipelineFailOption
- func ForPipelinePlannedToPipelineFail(e *PipelinePlanned, err error) PipelineFailOption
- func ForPipelineQueuedToPipelineFail(e *PipelineQueued, err error) PipelineFailOption
- func ForPipelineResumedToPipelineFail(e *PipelineResumed, err error) PipelineFailOption
- func ForPipelineStartedToPipelineFail(e *PipelineStarted, err error) PipelineFailOption
- func ForPipelineStepFinishedToPipelineFail(e *PipelineStepFinished, err error) PipelineFailOption
- func ForPipelineStepQueuedToPipelineFail(e *PipelineStepQueued, err error) PipelineFailOption
- func ForPipelineStepStartedToPipelineFail(e *PipelineStepStarted, err error) PipelineFailOption
- type PipelineFailed
- type PipelineFailedOption
- func ForPipelineCancelToPipelineFailed(cmd *PipelineCancel, err error) PipelineFailedOption
- func ForPipelineFail(cmd *PipelineFail, pipelineOutput map[string]interface{}) PipelineFailedOption
- func ForPipelineFinishToPipelineFailed(cmd *PipelineFinish, err error) PipelineFailedOption
- func ForPipelineLoadToPipelineFailed(cmd *PipelineLoad, err error) PipelineFailedOption
- func ForPipelinePauseToPipelineFailed(cmd *PipelinePause, err error) PipelineFailedOption
- func ForPipelinePlanToPipelineFailed(cmd *PipelinePlan, err error) PipelineFailedOption
- func ForPipelineQueueToPipelineFailed(cmd *PipelineQueue, err error) PipelineFailedOption
- func ForPipelineResumeToPipelineFailed(cmd *PipelineResume, err error) PipelineFailedOption
- func ForPipelineStartToPipelineFailed(cmd *PipelineStart, err error) PipelineFailedOption
- func ForPipelineStepFinishToPipelineFailed(cmd *PipelineStepFinish, err error) PipelineFailedOption
- func ForPipelineStepQueueToPipelineFailed(cmd *PipelineStepQueue, err error) PipelineFailedOption
- func ForPipelineStepStartToPipelineFailed(cmd *PipelineStepStart, err error) PipelineFailedOption
- type PipelineFinish
- type PipelineFinishOption
- type PipelineFinished
- type PipelineFinishedOption
- type PipelineLoad
- type PipelineLoadOption
- type PipelineLoaded
- type PipelineLoadedOption
- type PipelinePause
- type PipelinePauseOption
- type PipelinePaused
- type PipelinePausedOption
- type PipelinePlan
- type PipelinePlanOption
- func ForChildPipelineFinished(e *PipelineFinished, parentPipelineExecutionID string) PipelinePlanOption
- func ForPipelineResumed(e *PipelineResumed) PipelinePlanOption
- func ForPipelineStarted(e *PipelineStarted) PipelinePlanOption
- func ForPipelineStepFinished(e *PipelineStepFinished) PipelinePlanOption
- type PipelinePlanned
- type PipelinePlannedOption
- type PipelineQueue
- type PipelineQueueOption
- type PipelineQueued
- type PipelineQueuedOption
- type PipelineResume
- type PipelineResumeOption
- type PipelineResumed
- type PipelineResumedOption
- type PipelineStart
- type PipelineStartOption
- type PipelineStarted
- type PipelineStartedOption
- type PipelineStepFinish
- type PipelineStepFinishOption
- func ForPipelineFailed(e *PipelineFailed) PipelineStepFinishOption
- func ForPipelineFinished(e *PipelineFinished) PipelineStepFinishOption
- func WithPipelineExecutionID(id string) PipelineStepFinishOption
- func WithStepExecutionID(id string) PipelineStepFinishOption
- func WithStepForEach(stepForEach *modconfig.StepForEach) PipelineStepFinishOption
- type PipelineStepFinished
- type PipelineStepFinishedOption
- type PipelineStepQueue
- type PipelineStepQueueOption
- type PipelineStepQueued
- type PipelineStepQueuedOption
- type PipelineStepStart
- type PipelineStepStartOption
- func ForPipelinePlanned(e *PipelinePlanned) PipelineStepStartOption
- func ForPipelineStepQueued(e *PipelineStepQueued) PipelineStepStartOption
- func WithStep(name string, input modconfig.Input, stepForEach *modconfig.StepForEach, ...) PipelineStepStartOption
- func WithStepLoop(stepLoop *modconfig.StepLoop) PipelineStepStartOption
- type PipelineStepStarted
- type PipelineStepStartedOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandEvent ¶
type Event ¶
type Event struct { // Every execution has a unique ID. This is used right through from initial // triggering down through all pipelines, steps and nested pipelines. ExecutionID string `json:"execution_id"` // Time when the command was created. CreatedAt time.Time `json:"created_at"` }
All events have a shared structure to track execution context.
func NewChildEvent ¶
func NewEventForExecutionID ¶
func NewExecutionEvent ¶
func NewFlowEvent ¶
func NewParentEvent ¶
type PayloadWithEvent ¶
type PayloadWithEvent struct {
Event *Event `json:"event"`
}
type PipelineCancel ¶
type PipelineCancel struct { // Event metadata Event *Event `json:"event"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` ExecutionID string `json:"execution_id,omitempty"` // Reason for the cancellation Reason string `json:"reason,omitempty"` }
func NewPipelineCancel ¶
func NewPipelineCancel(pipelineExecutionID string, opts ...PipelineCancelOption) (*PipelineCancel, error)
NewPipelineCancel creates a new PipelineCancel event.
func (*PipelineCancel) GetEvent ¶
func (e *PipelineCancel) GetEvent() *Event
func (*PipelineCancel) HandlerName ¶
func (e *PipelineCancel) HandlerName() string
type PipelineCancelOption ¶
type PipelineCancelOption func(*PipelineCancel) error
ExecutionOption is a function that modifies an Execution instance.
type PipelineCanceled ¶
type PipelineCanceled struct { // Event metadata Event *Event `json:"event"` // Unique identifier for this pipeline execution PipelineExecutionID string `json:"pipeline_execution_id"` // Reason for the cancellation Reason string `json:"reason,omitempty"` }
func NewPipelineCanceled ¶
func NewPipelineCanceled(opts ...PipelineCanceledOption) (*PipelineCanceled, error)
NewPipelineCanceled creates a new PipelineCanceled event.
func (*PipelineCanceled) GetEvent ¶
func (e *PipelineCanceled) GetEvent() *Event
func (*PipelineCanceled) HandlerName ¶
func (e *PipelineCanceled) HandlerName() string
type PipelineCanceledOption ¶
type PipelineCanceledOption func(*PipelineCanceled) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineCancel ¶
func ForPipelineCancel(cmd *PipelineCancel) PipelineCanceledOption
ForPipelineCancel returns a PipelineCanceledOption that sets the fields of the PipelineCanceled event from a PipelineCancel command.
type PipelineFail ¶
type PipelineFail struct { // Event metadata Event *Event `json:"event"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` // Error details Error *modconfig.StepError `json:"error,omitempty"` }
func NewPipelineFail ¶
func NewPipelineFail(opts ...PipelineFailOption) *PipelineFail
NewPipelineFail creates a new PipelineFail event. Unlike other events, creating a pipeline fail event cannot have an error as an option (because we're already handling errors).
func (*PipelineFail) GetEvent ¶
func (e *PipelineFail) GetEvent() *Event
func (*PipelineFail) HandlerName ¶
func (e *PipelineFail) HandlerName() string
type PipelineFailOption ¶
type PipelineFailOption func(*PipelineFail)
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineFinishedToPipelineFail ¶
func ForPipelineFinishedToPipelineFail(e *PipelineFinished, err error) PipelineFailOption
func ForPipelineLoadedToPipelineFail ¶
func ForPipelineLoadedToPipelineFail(e *PipelineLoaded, err error) PipelineFailOption
func ForPipelinePlannedToPipelineFail ¶
func ForPipelinePlannedToPipelineFail(e *PipelinePlanned, err error) PipelineFailOption
func ForPipelineQueuedToPipelineFail ¶
func ForPipelineQueuedToPipelineFail(e *PipelineQueued, err error) PipelineFailOption
func ForPipelineResumedToPipelineFail ¶
func ForPipelineResumedToPipelineFail(e *PipelineResumed, err error) PipelineFailOption
func ForPipelineStartedToPipelineFail ¶
func ForPipelineStartedToPipelineFail(e *PipelineStarted, err error) PipelineFailOption
func ForPipelineStepFinishedToPipelineFail ¶
func ForPipelineStepFinishedToPipelineFail(e *PipelineStepFinished, err error) PipelineFailOption
func ForPipelineStepQueuedToPipelineFail ¶
func ForPipelineStepQueuedToPipelineFail(e *PipelineStepQueued, err error) PipelineFailOption
func ForPipelineStepStartedToPipelineFail ¶
func ForPipelineStepStartedToPipelineFail(e *PipelineStepStarted, err error) PipelineFailOption
type PipelineFailed ¶
type PipelineFailed struct { // Event metadata Event *Event `json:"event"` // Unique identifier for this pipeline execution PipelineExecutionID string `json:"pipeline_execution_id"` // Error details Error *modconfig.StepError `json:"error,omitempty"` PipelineOutput map[string]interface{} `json:"pipeline_output"` }
func NewPipelineFailed ¶
func NewPipelineFailed(ctx context.Context, opts ...PipelineFailedOption) *PipelineFailed
NewPipelineFailed creates a new PipelineFailed event. Unlike other events, creating a pipeline failed event cannot have an error as an option (because we're already handling errors).
func (*PipelineFailed) GetEvent ¶
func (e *PipelineFailed) GetEvent() *Event
func (*PipelineFailed) HandlerName ¶
func (e *PipelineFailed) HandlerName() string
type PipelineFailedOption ¶
type PipelineFailedOption func(*PipelineFailed) error
PipelineFailedOption is a function that modifies an Execution instance.
func ForPipelineCancelToPipelineFailed ¶
func ForPipelineCancelToPipelineFailed(cmd *PipelineCancel, err error) PipelineFailedOption
ForPipelineCancelToPipelineFailed returns a PipelineFailedOption that sets the fields of the PipelineFailed event from a PipelineCancel command.
func ForPipelineFail ¶
func ForPipelineFail(cmd *PipelineFail, pipelineOutput map[string]interface{}) PipelineFailedOption
ForPipelineFail returns a PipelineFailedOption that sets the fields of the PipelineFailed event from a PipelineFail command.
func ForPipelineFinishToPipelineFailed ¶
func ForPipelineFinishToPipelineFailed(cmd *PipelineFinish, err error) PipelineFailedOption
ForPipelineFinishToPipelineFailed returns a PipelineFailedOption that sets the fields of the PipelineFailed event from a PipelineFinish command.
func ForPipelineLoadToPipelineFailed ¶
func ForPipelineLoadToPipelineFailed(cmd *PipelineLoad, err error) PipelineFailedOption
ForPipelineLoadToPipelineFailed returns a PipelineFailedOption that sets the fields of the PipelineFailed event from a PipelineLoad command.
func ForPipelinePauseToPipelineFailed ¶
func ForPipelinePauseToPipelineFailed(cmd *PipelinePause, err error) PipelineFailedOption
func ForPipelinePlanToPipelineFailed ¶
func ForPipelinePlanToPipelineFailed(cmd *PipelinePlan, err error) PipelineFailedOption
ForPipelinePlanToPipelineFailed returns a PipelineFailedOption that sets the fields of the PipelineFailed event from a PipelinePlan command.
func ForPipelineQueueToPipelineFailed ¶
func ForPipelineQueueToPipelineFailed(cmd *PipelineQueue, err error) PipelineFailedOption
ForPipelineQueueToPipelineFailed returns a PipelineFailedOption that sets the fields of the PipelineFailed event from a PipelineQueue command.
func ForPipelineResumeToPipelineFailed ¶
func ForPipelineResumeToPipelineFailed(cmd *PipelineResume, err error) PipelineFailedOption
func ForPipelineStartToPipelineFailed ¶
func ForPipelineStartToPipelineFailed(cmd *PipelineStart, err error) PipelineFailedOption
ForPipelineStartToPipelineFailed returns a PipelineFailedOption that sets the fields of the PipelineFailed event from a PipelineStart command.
func ForPipelineStepFinishToPipelineFailed ¶
func ForPipelineStepFinishToPipelineFailed(cmd *PipelineStepFinish, err error) PipelineFailedOption
func ForPipelineStepQueueToPipelineFailed ¶
func ForPipelineStepQueueToPipelineFailed(cmd *PipelineStepQueue, err error) PipelineFailedOption
func ForPipelineStepStartToPipelineFailed ¶
func ForPipelineStepStartToPipelineFailed(cmd *PipelineStepStart, err error) PipelineFailedOption
type PipelineFinish ¶
type PipelineFinish struct { // Event metadata Event *Event `json:"event"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` Output *modconfig.Output `json:"output,omitempty"` }
func NewPipelineFinish ¶
func NewPipelineFinish(opts ...PipelineFinishOption) (*PipelineFinish, error)
NewPipelineFinish creates a new PipelineFinish event.
func (*PipelineFinish) GetEvent ¶
func (e *PipelineFinish) GetEvent() *Event
func (*PipelineFinish) HandlerName ¶
func (e *PipelineFinish) HandlerName() string
type PipelineFinishOption ¶
type PipelineFinishOption func(*PipelineFinish) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelinePlannedToPipelineFinish ¶
func ForPipelinePlannedToPipelineFinish(e *PipelinePlanned) PipelineFinishOption
func WithPipelineOutput ¶
func WithPipelineOutput(output *modconfig.Output) PipelineFinishOption
type PipelineFinished ¶
type PipelineFinished struct { // Event metadata Event *Event `json:"event"` // Unique identifier for this pipeline execution PipelineExecutionID string `json:"pipeline_execution_id"` PipelineOutput map[string]interface{} `json:"pipeline_output"` }
func NewPipelineFinished ¶
func NewPipelineFinished(opts ...PipelineFinishedOption) (*PipelineFinished, error)
NewPipelineFinished creates a new PipelineFinished event.
func (*PipelineFinished) GetEvent ¶
func (e *PipelineFinished) GetEvent() *Event
func (*PipelineFinished) HandlerName ¶
func (e *PipelineFinished) HandlerName() string
type PipelineFinishedOption ¶
type PipelineFinishedOption func(*PipelineFinished) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineFinish ¶
func ForPipelineFinish(cmd *PipelineFinish, pipelineOutput map[string]interface{}) PipelineFinishedOption
ForPipelineFinish returns a PipelineFinishedOption that sets the fields of the PipelineFinished event from a PipelineFinish command.
type PipelineLoad ¶
type PipelineLoad struct { // Event metadata Event *Event `json:"event"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` }
func NewPipelineLoad ¶
func NewPipelineLoad(opts ...PipelineLoadOption) (*PipelineLoad, error)
NewPipelineLoad creates a new PipelineLoad event.
func (*PipelineLoad) GetEvent ¶
func (e *PipelineLoad) GetEvent() *Event
func (*PipelineLoad) HandlerName ¶
func (e *PipelineLoad) HandlerName() string
type PipelineLoadOption ¶
type PipelineLoadOption func(*PipelineLoad) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineQueued ¶
func ForPipelineQueued(e *PipelineQueued) PipelineLoadOption
ForPipelineLoad returns a PipelineLoadOption that sets the fields of the PipelineLoad event from a PipelineLoad command.
type PipelineLoaded ¶
type PipelineLoaded struct { // Event metadata Event *Event `json:"event"` // Unique identifier for this pipeline execution PipelineExecutionID string `json:"pipeline_execution_id"` // Pipeline definition that was loaded Pipeline *modconfig.Pipeline `json:"pipeline"` }
func NewPipelineLoaded ¶
func NewPipelineLoaded(opts ...PipelineLoadedOption) (*PipelineLoaded, error)
NewPipelineLoaded creates a new PipelineLoaded event.
func (*PipelineLoaded) GetEvent ¶
func (e *PipelineLoaded) GetEvent() *Event
func (*PipelineLoaded) HandlerName ¶
func (e *PipelineLoaded) HandlerName() string
type PipelineLoadedOption ¶
type PipelineLoadedOption func(*PipelineLoaded) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineLoad ¶
func ForPipelineLoad(cmd *PipelineLoad) PipelineLoadedOption
ForPipelineLoad returns a PipelineLoadedOption that sets the fields of the PipelineLoaded event from a PipelineLoad command.
func WithPipelineDefinition ¶
func WithPipelineDefinition(pipeline *modconfig.Pipeline) PipelineLoadedOption
WithPipeline sets the Pipeline of the PipelineLoaded event.
type PipelinePause ¶
type PipelinePause struct { // Event metadata Event *Event `json:"event"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` ExecutionID string `json:"execution_id,omitempty"` // Reason for pausing the pipeline execution Reason string `json:"reason,omitempty"` }
func NewPipelinePause ¶
func NewPipelinePause(pipelineExecutionID string, opts ...PipelinePauseOption) (*PipelinePause, error)
NewPipelineCancel creates a new PipelineCancel event.
func (*PipelinePause) GetEvent ¶
func (e *PipelinePause) GetEvent() *Event
func (*PipelinePause) HandlerName ¶
func (e *PipelinePause) HandlerName() string
type PipelinePauseOption ¶
type PipelinePauseOption func(*PipelinePause) error
ExecutionOption is a function that modifies an Execution instance.
type PipelinePaused ¶
type PipelinePaused struct { // Event metadata Event *Event `json:"event"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` //Reason for pausing the pipeline execution Reason string `json:"reason,omitempty"` }
func NewPipelinePaused ¶
func NewPipelinePaused(opts ...PipelinePausedOption) (*PipelinePaused, error)
NewPipelineCancel creates a new PipelineCancel event.
func (*PipelinePaused) GetEvent ¶
func (e *PipelinePaused) GetEvent() *Event
func (*PipelinePaused) HandlerName ¶
func (e *PipelinePaused) HandlerName() string
type PipelinePausedOption ¶
type PipelinePausedOption func(*PipelinePaused) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelinePause ¶
func ForPipelinePause(cmd *PipelinePause) PipelinePausedOption
type PipelinePlan ¶
type PipelinePlan struct { // Event metadata Event *Event `json:"event"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` }
func NewPipelinePlan ¶
func NewPipelinePlan(opts ...PipelinePlanOption) (*PipelinePlan, error)
NewPipelinePlan creates a new PipelinePlan event.
func (*PipelinePlan) GetEvent ¶
func (e *PipelinePlan) GetEvent() *Event
func (*PipelinePlan) HandlerName ¶
func (e *PipelinePlan) HandlerName() string
type PipelinePlanOption ¶
type PipelinePlanOption func(*PipelinePlan) error
ExecutionOption is a function that modifies an Execution instance.
func ForChildPipelineFinished ¶
func ForChildPipelineFinished(e *PipelineFinished, parentPipelineExecutionID string) PipelinePlanOption
func ForPipelineResumed ¶
func ForPipelineResumed(e *PipelineResumed) PipelinePlanOption
func ForPipelineStarted ¶
func ForPipelineStarted(e *PipelineStarted) PipelinePlanOption
func ForPipelineStepFinished ¶
func ForPipelineStepFinished(e *PipelineStepFinished) PipelinePlanOption
type PipelinePlanned ¶
type PipelinePlanned struct { // Event metadata Event *Event `json:"event"` // Unique identifier for this pipeline execution PipelineExecutionID string `json:"pipeline_execution_id"` // The planner outputs a list of the next steps to be executed in the types. NextSteps []modconfig.NextStep `json:"next_steps"` }
func NewPipelinePlanned ¶
func NewPipelinePlanned(opts ...PipelinePlannedOption) (*PipelinePlanned, error)
NewPipelinePlanned creates a new PipelinePlanned event.
func (*PipelinePlanned) GetEvent ¶
func (e *PipelinePlanned) GetEvent() *Event
func (*PipelinePlanned) HandlerName ¶
func (e *PipelinePlanned) HandlerName() string
type PipelinePlannedOption ¶
type PipelinePlannedOption func(*PipelinePlanned) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelinePlan ¶
func ForPipelinePlan(cmd *PipelinePlan) PipelinePlannedOption
ForPipelinePlan returns a PipelinePlannedOption that sets the fields of the PipelinePlanned event from a PipelinePlan command.
type PipelineQueue ¶
type PipelineQueue struct { // Event metadata Event *Event `json:"event"` // Pipeline details Name string `json:"name"` Args modconfig.Input `json:"args" cty:"args"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` // If this is a child pipeline then set the parent pipeline execution ID ParentStepExecutionID string `json:"parent_step_execution_id,omitempty"` ParentExecutionID string `json:"parent_execution_id,omitempty"` }
PipelineQueue commands a pipeline to be queued for execution.
func NewPipelineQueue ¶
func NewPipelineQueue(opts ...PipelineQueueOption) (*PipelineQueue, error)
NewPipelineQueue creates a new PipelineQueue event.
func (*PipelineQueue) GetEvent ¶
func (e *PipelineQueue) GetEvent() *Event
func (*PipelineQueue) HandlerName ¶
func (e *PipelineQueue) HandlerName() string
type PipelineQueueOption ¶
type PipelineQueueOption func(*PipelineQueue) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineStepStartedToPipelineQueue ¶
func ForPipelineStepStartedToPipelineQueue(e *PipelineStepStarted) PipelineQueueOption
ForPipelineQueue returns a PipelineQueueOption that sets the fields of the PipelineQueue event from a PipelineQueue command.
type PipelineQueued ¶
type PipelineQueued struct { // Event metadata Event *Event `json:"event"` // Name of the pipeline to be queued Name string `json:"name"` // Input to the pipeline Args modconfig.Input `json:"args"` // Unique identifier for this pipeline execution PipelineExecutionID string `json:"pipeline_execution_id"` // If this is a child pipeline then set the parent step execution ID ParentStepExecutionID string `json:"parent_step_execution_id,omitempty"` ParentExecutionID string `json:"parent_execution_id,omitempty"` }
PipelineQueued is published when a pipeline is queued
func NewPipelineQueued ¶
func NewPipelineQueued(opts ...PipelineQueuedOption) (*PipelineQueued, error)
NewPipelineQueued creates a new PipelineQueued event.
func (*PipelineQueued) GetEvent ¶
func (e *PipelineQueued) GetEvent() *Event
func (*PipelineQueued) HandlerName ¶
func (e *PipelineQueued) HandlerName() string
type PipelineQueuedOption ¶
type PipelineQueuedOption func(*PipelineQueued) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineQueue ¶
func ForPipelineQueue(cmd *PipelineQueue) PipelineQueuedOption
ForPipelineQueue returns a PipelineQueuedOption that sets the fields of the PipelineQueued event from a PipelineQueue command.
type PipelineResume ¶
type PipelineResume struct { // Event metadata Event *Event `json:"event"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` ExecutionID string `json:"execution_id,omitempty"` // Reason for the cancellation Reason string `json:"reason,omitempty"` }
func NewPipelineResume ¶
func NewPipelineResume(pipelineExecutionID string, opts ...PipelineResumeOption) (*PipelineResume, error)
func (*PipelineResume) GetEvent ¶
func (e *PipelineResume) GetEvent() *Event
func (*PipelineResume) HandlerName ¶
func (e *PipelineResume) HandlerName() string
type PipelineResumeOption ¶
type PipelineResumeOption func(*PipelineResume) error
ExecutionOption is a function that modifies an Execution instance.
type PipelineResumed ¶
type PipelineResumed struct { // Event metadata Event *Event `json:"event"` // Unique identifier for this pipeline execution PipelineExecutionID string `json:"pipeline_execution_id"` // Reason for the cancellation Reason string `json:"reason,omitempty"` }
func NewPipelineResumed ¶
func NewPipelineResumed(opts ...PipelineResumedOption) (*PipelineResumed, error)
NewPipelineResumed creates a new PipelineResumed event.
func (*PipelineResumed) GetEvent ¶
func (e *PipelineResumed) GetEvent() *Event
func (*PipelineResumed) HandlerName ¶
func (e *PipelineResumed) HandlerName() string
type PipelineResumedOption ¶
type PipelineResumedOption func(*PipelineResumed) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineResume ¶
func ForPipelineResume(evt *PipelineResume) PipelineResumedOption
type PipelineStart ¶
type PipelineStart struct { // Event metadata Event *Event `json:"event"` // Pipeline execution details PipelineExecutionID string `json:"pipeline_execution_id"` }
func NewPipelineStart ¶
func NewPipelineStart(opts ...PipelineStartOption) (*PipelineStart, error)
NewPipelineStart creates a new PipelineStart event.
func (*PipelineStart) GetEvent ¶
func (e *PipelineStart) GetEvent() *Event
func (*PipelineStart) HandlerName ¶
func (e *PipelineStart) HandlerName() string
type PipelineStartOption ¶
type PipelineStartOption func(*PipelineStart) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineLoaded ¶
func ForPipelineLoaded(e *PipelineLoaded) PipelineStartOption
ForPipelineStart returns a PipelineStartOption that sets the fields of the PipelineStart event from a PipelineStart command.
type PipelineStarted ¶
type PipelineStarted struct { // Event metadata Event *Event `json:"event"` // Unique identifier for this pipeline execution PipelineExecutionID string `json:"pipeline_execution_id"` }
func NewPipelineStarted ¶
func NewPipelineStarted(opts ...PipelineStartedOption) (*PipelineStarted, error)
NewPipelineStarted creates a new PipelineStarted event.
func (*PipelineStarted) GetEvent ¶
func (e *PipelineStarted) GetEvent() *Event
func (*PipelineStarted) HandlerName ¶
func (e *PipelineStarted) HandlerName() string
type PipelineStartedOption ¶
type PipelineStartedOption func(*PipelineStarted) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineStart ¶
func ForPipelineStart(cmd *PipelineStart) PipelineStartedOption
ForPipelineStart returns a PipelineStartedOption that sets the fields of the PipelineStarted event from a PipelineStart command.
type PipelineStepFinish ¶
type PipelineStepFinish struct { // Event metadata Event *Event `json:"event"` // Step execution details PipelineExecutionID string `json:"pipeline_execution_id"` StepExecutionID string `json:"step_execution_id"` Output *modconfig.Output `json:"output,omitempty"` // for_each controls StepForEach *modconfig.StepForEach `json:"step_for_each,omitempty"` }
func NewPipelineStepFinish ¶
func NewPipelineStepFinish(opts ...PipelineStepFinishOption) (*PipelineStepFinish, error)
NewPipelineStepFinish creates a new PipelineStepFinish event.
func (*PipelineStepFinish) GetEvent ¶
func (e *PipelineStepFinish) GetEvent() *Event
func (*PipelineStepFinish) HandlerName ¶
func (e *PipelineStepFinish) HandlerName() string
type PipelineStepFinishOption ¶
type PipelineStepFinishOption func(*PipelineStepFinish) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineFailed ¶
func ForPipelineFailed(e *PipelineFailed) PipelineStepFinishOption
func ForPipelineFinished ¶
func ForPipelineFinished(e *PipelineFinished) PipelineStepFinishOption
func WithPipelineExecutionID ¶
func WithPipelineExecutionID(id string) PipelineStepFinishOption
func WithStepExecutionID ¶
func WithStepExecutionID(id string) PipelineStepFinishOption
func WithStepForEach ¶
func WithStepForEach(stepForEach *modconfig.StepForEach) PipelineStepFinishOption
type PipelineStepFinished ¶
type PipelineStepFinished struct { // Event metadata Event *Event `json:"event"` // Step execution details PipelineExecutionID string `json:"pipeline_execution_id"` StepExecutionID string `json:"step_execution_id"` // Output from the primitive, this is the "native" output of the primitive Output *modconfig.Output `json:"output,omitempty"` // Step output configured from the output block, we need a separate field for this because // we don't want the StepOutput accidentally override the native primtive outputs StepOutput map[string]interface{} `json:"step_output,omitempty"` // loop controls StepForEach *modconfig.StepForEach `json:"step_for_each,omitempty"` StepLoop *modconfig.StepLoop `json:"step_loop,omitempty"` }
func NewPipelineStepFinished ¶
func NewPipelineStepFinished(opts ...PipelineStepFinishedOption) (*PipelineStepFinished, error)
NewPipelineStepFinished creates a new PipelineStepFinished event.
func (*PipelineStepFinished) GetEvent ¶
func (e *PipelineStepFinished) GetEvent() *Event
func (*PipelineStepFinished) HandlerName ¶
func (e *PipelineStepFinished) HandlerName() string
type PipelineStepFinishedOption ¶
type PipelineStepFinishedOption func(*PipelineStepFinished) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineStepFinish ¶
func ForPipelineStepFinish(cmd *PipelineStepFinish) PipelineStepFinishedOption
func ForPipelineStepStartToPipelineStepFinished ¶
func ForPipelineStepStartToPipelineStepFinished(cmd *PipelineStepStart) PipelineStepFinishedOption
func WithStepOutput ¶
type PipelineStepQueue ¶
type PipelineStepQueue struct { // Event metadata Event *Event `json:"event"` // Step execution details PipelineExecutionID string `json:"pipeline_execution_id"` StepExecutionID string `json:"step_execution_id"` StepName string `json:"step_name"` StepInput modconfig.Input `json:"input"` // for_each controls StepForEach *modconfig.StepForEach `json:"step_for_each,omitempty"` StepLoop *modconfig.StepLoop `json:"step_loop,omitempty"` DelayMs int `json:"delay_ms,omitempty"` // delay start in milliseconds NextStepAction modconfig.NextStepAction `json:"action,omitempty"` }
func NewPipelineStepQueue ¶
func NewPipelineStepQueue(opts ...PipelineStepQueueOption) (*PipelineStepQueue, error)
NewPipelineStepQueue creates a new PipelineStepQueue event.
func (*PipelineStepQueue) GetEvent ¶
func (e *PipelineStepQueue) GetEvent() *Event
func (*PipelineStepQueue) HandlerName ¶
func (e *PipelineStepQueue) HandlerName() string
type PipelineStepQueueOption ¶
type PipelineStepQueueOption func(*PipelineStepQueue) error
ExecutionOption is a function that modifies an Execution instance.
func PipelineStepQueueForPipelinePlanned ¶
func PipelineStepQueueForPipelinePlanned(e *PipelinePlanned) PipelineStepQueueOption
func PipelineStepQueueWithStep ¶
func PipelineStepQueueWithStep(name string, input modconfig.Input, stepForEach *modconfig.StepForEach, stepLoop *modconfig.StepLoop, delayMs int, nextStepAction modconfig.NextStepAction) PipelineStepQueueOption
type PipelineStepQueued ¶
type PipelineStepQueued struct { // Event metadata Event *Event `json:"event"` // Unique identifier for this pipeline execution PipelineExecutionID string `json:"pipeline_execution_id"` StepExecutionID string `json:"step_execution_id"` StepName string `json:"step_name"` StepInput modconfig.Input `json:"input"` // for_each controls StepForEach *modconfig.StepForEach `json:"step_for_each,omitempty"` StepLoop *modconfig.StepLoop NextStepAction modconfig.NextStepAction `json:"next_step_action,omitempty"` DelayMs int `json:"delay_ms,omitempty"` // delay start in milliseconds }
func NewPipelineStepQueued ¶
func NewPipelineStepQueued(opts ...PipelineStepQueuedOption) (*PipelineStepQueued, error)
NewPipelineStepQueued creates a new PipelineStepQueued event.
func (*PipelineStepQueued) GetEvent ¶
func (e *PipelineStepQueued) GetEvent() *Event
func (*PipelineStepQueued) HandlerName ¶
func (e *PipelineStepQueued) HandlerName() string
type PipelineStepQueuedOption ¶
type PipelineStepQueuedOption func(*PipelineStepQueued) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineStepQueue ¶
func ForPipelineStepQueue(cmd *PipelineStepQueue) PipelineStepQueuedOption
type PipelineStepStart ¶
type PipelineStepStart struct { // Event metadata Event *Event `json:"event"` // Step execution details PipelineExecutionID string `json:"pipeline_execution_id"` StepExecutionID string `json:"step_execution_id"` StepName string `json:"step_name"` StepInput modconfig.Input `json:"input"` // for_each controls StepForEach *modconfig.StepForEach `json:"step_for_each,omitempty"` StepLoop *modconfig.StepLoop `json:"step_loop,omitempty"` DelayMs int `json:"delay_ms,omitempty"` // delay start in milliseconds NextStepAction modconfig.NextStepAction `json:"next_step_action,omitempty"` }
func NewPipelineStepStart ¶
func NewPipelineStepStart(opts ...PipelineStepStartOption) (*PipelineStepStart, error)
NewPipelineStepStart creates a new PipelineStepStart event.
func (*PipelineStepStart) GetEvent ¶
func (e *PipelineStepStart) GetEvent() *Event
func (*PipelineStepStart) HandlerName ¶
func (e *PipelineStepStart) HandlerName() string
type PipelineStepStartOption ¶
type PipelineStepStartOption func(*PipelineStepStart) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelinePlanned ¶
func ForPipelinePlanned(e *PipelinePlanned) PipelineStepStartOption
func ForPipelineStepQueued ¶
func ForPipelineStepQueued(e *PipelineStepQueued) PipelineStepStartOption
func WithStep ¶
func WithStep(name string, input modconfig.Input, stepForEach *modconfig.StepForEach, stepLoop *modconfig.StepLoop, nextStepAction modconfig.NextStepAction) PipelineStepStartOption
func WithStepLoop ¶
func WithStepLoop(stepLoop *modconfig.StepLoop) PipelineStepStartOption
type PipelineStepStarted ¶
type PipelineStepStarted struct { // Event metadata Event *Event `json:"event"` // Step execution details PipelineExecutionID string `json:"pipeline_execution_id"` StepExecutionID string `json:"step_execution_id"` // Optional details for step execution ChildPipelineExecutionID string `json:"child_pipeline_execution_id,omitempty"` ChildPipelineName string `json:"child_pipeline_name,omitempty"` ChildPipelineArgs modconfig.Input `json:"child_pipeline_args,omitempty"` // The key for a single step is always "0" but say this pipeline step start is part of for_each, the key is // populated with the actual key: "0"/"1"/"2" or "foo"/"bar"/"baz" (for map based for_each) // // This key is only relevant to its immediate parent (if we have multiple nested pipelines) Key string `json:"key"` }
! This event is only for starting Pipeline Step, not a general step start command. ! ! For general Step Start command, refer to PipelineStepStart
TODO: at one point we should rename this command, make it more clear.
func NewPipelineStepStarted ¶
func NewPipelineStepStarted(opts ...PipelineStepStartedOption) (*PipelineStepStarted, error)
NewPipelineStepStarted creates a new PipelineStepStarted event.
func (*PipelineStepStarted) GetEvent ¶
func (e *PipelineStepStarted) GetEvent() *Event
func (*PipelineStepStarted) HandlerName ¶
func (e *PipelineStepStarted) HandlerName() string
type PipelineStepStartedOption ¶
type PipelineStepStartedOption func(*PipelineStepStarted) error
ExecutionOption is a function that modifies an Execution instance.
func ForPipelineStepStart ¶
func ForPipelineStepStart(cmd *PipelineStepStart) PipelineStepStartedOption
func WithChildPipeline ¶
func WithChildPipeline(name string, args modconfig.Input) PipelineStepStartedOption
func WithChildPipelineExecutionID ¶
func WithChildPipelineExecutionID(id string) PipelineStepStartedOption
WithChildPipelineExecutionID returns a PipelineStepStartedOption that sets the ChildPipelineExecutionID to the given ID.
func WithNewChildPipelineExecutionID ¶
func WithNewChildPipelineExecutionID() PipelineStepStartedOption
WithNewChildPipelineExecutionID returns a PipelineStepStartedOption that sets the ChildPipelineExecutionID to a new ID.
Source Files ¶
- base.go
- pipeline_cancel.go
- pipeline_canceled.go
- pipeline_fail.go
- pipeline_failed.go
- pipeline_finish.go
- pipeline_finished.go
- pipeline_load.go
- pipeline_loaded.go
- pipeline_pause.go
- pipeline_paused.go
- pipeline_plan.go
- pipeline_planned.go
- pipeline_queue.go
- pipeline_queued.go
- pipeline_resume.go
- pipeline_resumed.go
- pipeline_start.go
- pipeline_started.go
- pipeline_step_finish.go
- pipeline_step_finished.go
- pipeline_step_queue.go
- pipeline_step_queued.go
- pipeline_step_start.go
- pipeline_step_started.go