workflowstate

package
v0.0.0-...-0de2bea Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry interface {
	GetProcessor(*model.WorkflowExecution) (StateProcessor, error)
}

type RegistryImpl

type RegistryImpl struct {
	ScheduleState *ScheduledStateProcessor
	RunningState  *RunningStateProcessor
}

func (*RegistryImpl) GetProcessor

func (registry *RegistryImpl) GetProcessor(execution *model.WorkflowExecution) (StateProcessor, error)

type RunningStateProcessor

type RunningStateProcessor struct {
	WorkflowExecutionDao dao.WorkflowExecutionDao
	TaskExecutionDao     dao.TaskExecutionDao
	TaskExecutorFactory  taskexecutor.Factory
	TaskPollerFactory    taskpoller.Factory
	KubeClient           kubernetes.Interface
}

func (*RunningStateProcessor) ToNextState

func (processor *RunningStateProcessor) ToNextState(execution *model.WorkflowExecution, db *gorm.DB) (bool, error)

type ScheduledStateProcessor

type ScheduledStateProcessor struct {
	WorkflowExecutionDao dao.WorkflowExecutionDao
	TaskExecutorFactory  taskexecutor.Factory
}

func (*ScheduledStateProcessor) ToNextState

func (scheduledState *ScheduledStateProcessor) ToNextState(execution *model.WorkflowExecution, db *gorm.DB) (bool, error)

type StateProcessor

type StateProcessor interface {
	// Change execution state to Next.
	// return true if change executed.
	ToNextState(*model.WorkflowExecution, *gorm.DB) (bool, error)
}

Jump to

Keyboard shortcuts

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