command

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndStepFromApi added in v0.4.2

func EndStepFromApi(ex *execution.ExecutionInMemory, stepExecution *execution.StepExecution, pipelineDefn *modconfig.Pipeline, stepDefn modconfig.PipelineStep, output *modconfig.Output, eventBus FpEventBus) error

func LogEventMessage

func LogEventMessage(ctx context.Context, evt interface{}, lock *sync.Mutex) error

Types

type CommandHandler

type CommandHandler struct {
	// Command handlers can only send events, they are not even permitted access
	// to the CommandBus.
	EventBus FpEventBus
}

type ExecutionFailHandler added in v1.0.0

type ExecutionFailHandler CommandHandler

func (ExecutionFailHandler) Handle added in v1.0.0

func (h ExecutionFailHandler) Handle(ctx context.Context, c interface{}) error

func (ExecutionFailHandler) HandlerName added in v1.0.0

func (h ExecutionFailHandler) HandlerName() string

func (ExecutionFailHandler) NewCommand added in v1.0.0

func (h ExecutionFailHandler) NewCommand() interface{}

type ExecutionFinishHandler added in v1.0.0

type ExecutionFinishHandler CommandHandler

func (ExecutionFinishHandler) Handle added in v1.0.0

func (h ExecutionFinishHandler) Handle(ctx context.Context, c interface{}) error

func (ExecutionFinishHandler) HandlerName added in v1.0.0

func (h ExecutionFinishHandler) HandlerName() string

func (ExecutionFinishHandler) NewCommand added in v1.0.0

func (h ExecutionFinishHandler) NewCommand() interface{}

type ExecutionPlanHandler added in v1.0.0

type ExecutionPlanHandler CommandHandler

func (ExecutionPlanHandler) Handle added in v1.0.0

func (h ExecutionPlanHandler) Handle(ctx context.Context, c interface{}) error

func (ExecutionPlanHandler) HandlerName added in v1.0.0

func (h ExecutionPlanHandler) HandlerName() string

func (ExecutionPlanHandler) NewCommand added in v1.0.0

func (h ExecutionPlanHandler) NewCommand() interface{}

type ExecutionQueueHandler added in v1.0.0

type ExecutionQueueHandler CommandHandler

func (ExecutionQueueHandler) Handle added in v1.0.0

func (h ExecutionQueueHandler) Handle(ctx context.Context, c interface{}) error

func (ExecutionQueueHandler) HandlerName added in v1.0.0

func (h ExecutionQueueHandler) HandlerName() string

func (ExecutionQueueHandler) NewCommand added in v1.0.0

func (h ExecutionQueueHandler) NewCommand() interface{}

type ExecutionStartHandler added in v1.0.0

type ExecutionStartHandler CommandHandler

func (ExecutionStartHandler) Handle added in v1.0.0

func (h ExecutionStartHandler) Handle(ctx context.Context, c interface{}) error

func (ExecutionStartHandler) HandlerName added in v1.0.0

func (h ExecutionStartHandler) HandlerName() string

func (ExecutionStartHandler) NewCommand added in v1.0.0

func (h ExecutionStartHandler) NewCommand() interface{}

type FpEventBus

type FpEventBus interface {
	Publish(ctx context.Context, event interface{}) error
}

type FpEventBusImpl added in v0.2.0

type FpEventBusImpl struct {
	Eb *cqrs.EventBus
}

func (FpEventBusImpl) Publish added in v0.2.0

func (c FpEventBusImpl) Publish(ctx context.Context, event interface{}) error

Publish sends event to the event bus.

type PipelineCancelHandler

type PipelineCancelHandler CommandHandler

func (PipelineCancelHandler) Handle

func (h PipelineCancelHandler) Handle(ctx context.Context, c interface{}) error

func (PipelineCancelHandler) HandlerName

func (h PipelineCancelHandler) HandlerName() string

func (PipelineCancelHandler) NewCommand

func (h PipelineCancelHandler) NewCommand() interface{}

type PipelineFailHandler

type PipelineFailHandler CommandHandler

func (PipelineFailHandler) Handle

func (h PipelineFailHandler) Handle(ctx context.Context, c interface{}) error

func (PipelineFailHandler) HandlerName

func (h PipelineFailHandler) HandlerName() string

func (PipelineFailHandler) NewCommand

func (h PipelineFailHandler) NewCommand() interface{}

type PipelineFinishHandler

type PipelineFinishHandler CommandHandler

func (PipelineFinishHandler) Handle

func (h PipelineFinishHandler) Handle(ctx context.Context, c interface{}) error

func (PipelineFinishHandler) HandlerName

func (h PipelineFinishHandler) HandlerName() string

func (PipelineFinishHandler) NewCommand

func (h PipelineFinishHandler) NewCommand() interface{}

type PipelineLoadHandler

type PipelineLoadHandler CommandHandler

func (PipelineLoadHandler) Handle

func (h PipelineLoadHandler) Handle(ctx context.Context, c interface{}) error

* Path from here: * PipelineLoad command handler -> PipelineLoaded event handler -> PipelineStart command

func (PipelineLoadHandler) HandlerName

func (h PipelineLoadHandler) HandlerName() string

func (PipelineLoadHandler) NewCommand

func (h PipelineLoadHandler) NewCommand() interface{}

type PipelinePauseHandler

type PipelinePauseHandler CommandHandler

func (PipelinePauseHandler) Handle

func (h PipelinePauseHandler) Handle(ctx context.Context, c interface{}) error

pipeline_pause command handler issue this to pause a pipeline execution

func (PipelinePauseHandler) HandlerName

func (h PipelinePauseHandler) HandlerName() string

func (PipelinePauseHandler) NewCommand

func (h PipelinePauseHandler) NewCommand() interface{}

type PipelinePlanHandler

type PipelinePlanHandler CommandHandler

func (PipelinePlanHandler) Handle

func (h PipelinePlanHandler) Handle(ctx context.Context, c interface{}) error

func (PipelinePlanHandler) HandlerName

func (h PipelinePlanHandler) HandlerName() string

func (PipelinePlanHandler) NewCommand

func (h PipelinePlanHandler) NewCommand() interface{}

type PipelineQueueHandler

type PipelineQueueHandler CommandHandler

func (PipelineQueueHandler) Handle

func (h PipelineQueueHandler) Handle(ctx context.Context, c interface{}) error

func (PipelineQueueHandler) HandlerName

func (h PipelineQueueHandler) HandlerName() string

func (PipelineQueueHandler) NewCommand

func (h PipelineQueueHandler) NewCommand() interface{}

type PipelineResumeHandler

type PipelineResumeHandler CommandHandler

func (PipelineResumeHandler) Handle

func (h PipelineResumeHandler) Handle(ctx context.Context, c interface{}) error

pipeline_resume command handler issue this to pause a pipeline execution

func (PipelineResumeHandler) HandlerName

func (h PipelineResumeHandler) HandlerName() string

func (PipelineResumeHandler) NewCommand

func (h PipelineResumeHandler) NewCommand() interface{}

type PipelineStartHandler

type PipelineStartHandler CommandHandler

func (PipelineStartHandler) Handle

func (h PipelineStartHandler) Handle(ctx context.Context, c interface{}) error

func (PipelineStartHandler) HandlerName

func (h PipelineStartHandler) HandlerName() string

func (PipelineStartHandler) NewCommand

func (h PipelineStartHandler) NewCommand() interface{}

type StepForEachPlanHandler

type StepForEachPlanHandler CommandHandler

func (StepForEachPlanHandler) Handle

func (h StepForEachPlanHandler) Handle(ctx context.Context, c interface{}) error

func (StepForEachPlanHandler) HandlerName

func (h StepForEachPlanHandler) HandlerName() string

func (StepForEachPlanHandler) NewCommand

func (h StepForEachPlanHandler) NewCommand() interface{}

type StepPipelineFinishHandler

type StepPipelineFinishHandler CommandHandler

func (StepPipelineFinishHandler) Handle

func (h StepPipelineFinishHandler) Handle(ctx context.Context, c interface{}) error

There's only one use case for this, which is to handle the "Pipeline Step" finish command.

Pipeline Step = step that launches another pipeline.

This command is NOT to to be confused with the handling of the "Pipeline Step" operation. That flow: Pipeline Step Start command -> Pipeline Step Finish *event*

func (StepPipelineFinishHandler) HandlerName

func (h StepPipelineFinishHandler) HandlerName() string

func (StepPipelineFinishHandler) NewCommand

func (h StepPipelineFinishHandler) NewCommand() interface{}

type StepQueueHandler

type StepQueueHandler CommandHandler

func (StepQueueHandler) Handle

func (h StepQueueHandler) Handle(ctx context.Context, c interface{}) error

* This is the handler that will actually execute the primitive

func (StepQueueHandler) HandlerName

func (h StepQueueHandler) HandlerName() string

func (StepQueueHandler) NewCommand

func (h StepQueueHandler) NewCommand() interface{}

type StepStartHandler

type StepStartHandler CommandHandler

func (StepStartHandler) Handle

func (h StepStartHandler) Handle(ctx context.Context, c interface{}) error

* This is the handler that will actually execute the primitive * * At the end of the execution it will raise the appropriate event: StepFinished or PipelineFailed * * Also note the "special" step handler for launching child pipelines

func (StepStartHandler) HandlerName

func (h StepStartHandler) HandlerName() string

func (StepStartHandler) NewCommand

func (h StepStartHandler) NewCommand() interface{}

type TriggerFinishHandler added in v1.0.0

type TriggerFinishHandler CommandHandler

func (TriggerFinishHandler) Handle added in v1.0.0

func (h TriggerFinishHandler) Handle(ctx context.Context, c interface{}) error

func (TriggerFinishHandler) HandlerName added in v1.0.0

func (h TriggerFinishHandler) HandlerName() string

func (TriggerFinishHandler) NewCommand added in v1.0.0

func (h TriggerFinishHandler) NewCommand() interface{}

type TriggerQueueHandler added in v1.0.0

type TriggerQueueHandler CommandHandler

func (TriggerQueueHandler) Handle added in v1.0.0

func (h TriggerQueueHandler) Handle(ctx context.Context, c interface{}) error

func (TriggerQueueHandler) HandlerName added in v1.0.0

func (h TriggerQueueHandler) HandlerName() string

func (TriggerQueueHandler) NewCommand added in v1.0.0

func (h TriggerQueueHandler) NewCommand() interface{}

type TriggerStartHandler added in v1.0.0

type TriggerStartHandler CommandHandler

func (TriggerStartHandler) Handle added in v1.0.0

func (h TriggerStartHandler) Handle(ctx context.Context, c interface{}) error

func (TriggerStartHandler) HandlerName added in v1.0.0

func (h TriggerStartHandler) HandlerName() string

func (TriggerStartHandler) NewCommand added in v1.0.0

func (h TriggerStartHandler) NewCommand() interface{}

Jump to

Keyboard shortcuts

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