command

package
v0.7.0-beta.202408130436 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 26 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 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{}

Jump to

Keyboard shortcuts

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