Documentation
¶
Index ¶
- type Executor
- type ExternalQueue
- type FlowEngine
- func (f *FlowEngine) DelayAction(wfName string, flowId string, actionName string, actionId int, ...)
- func (f *FlowEngine) ExecuteAction(wfName string, wfId string, event string, actionId int, data map[string]any)
- func (f *FlowEngine) ExecuteDelay(wfName string, flowId string, actionId int)
- func (f *FlowEngine) ExecuteResume(wfName string, flowId string, event string)
- func (f *FlowEngine) ExecuteResumeAfterWait(wfName string, flowId string, event string) error
- func (f *FlowEngine) ExecuteRetry(wfName string, flowId string, actionId int)
- func (f *FlowEngine) ExecuteSystemAction(wfName string, flowId string, actionId int)
- func (f *FlowEngine) Init(wfName string, flowId string, input map[string]any) error
- func (f *FlowEngine) MarkComplete(wfName string, flowId string, successhandler flow.Statehandler)
- func (f *FlowEngine) MarkFailed(wfName string, flowId string)
- func (f *FlowEngine) MarkPaused(wfName string, flowId string)
- func (f *FlowEngine) MarkRunning(wfName string, flowId string)
- func (f *FlowEngine) MarkWaitingDelay(wfName string, flowId string)
- func (f *FlowEngine) MarkWaitingEvent(wfName string, flowId string, event string)
- func (f *FlowEngine) RetryFailedAction(wfName string, flowId string, actionName string, actionId int)
- func (f *FlowEngine) RetryTimedoutAction(wfName string, flowId string, actionName string, actionId int)
- type FlowStateMachine
- type FlowStateMachineContainer
- func (sc *FlowStateMachineContainer) Delete(wf string, flowId string)
- func (sc *FlowStateMachineContainer) Get(wf string, flowId string) (*FlowStateMachine, error)
- func (sc *FlowStateMachineContainer) Init(wf string, flowId string, input map[string]any) (*FlowStateMachine, error)
- func (sc *FlowStateMachineContainer) Store(wf string, flowId string, m *FlowStateMachine)
- type Shard
- type StateHandlerContainer
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalQueue ¶
type FlowEngine ¶
type FlowEngine struct {
// contains filtered or unexported fields
}
func NewFlowEngine ¶
func NewFlowEngine(storage Storage, metadadataService metadata.MetadataService, stateMachineContainer *FlowStateMachineContainer) *FlowEngine
func (*FlowEngine) DelayAction ¶
func (*FlowEngine) ExecuteAction ¶
func (*FlowEngine) ExecuteDelay ¶
func (f *FlowEngine) ExecuteDelay(wfName string, flowId string, actionId int)
func (*FlowEngine) ExecuteResume ¶
func (f *FlowEngine) ExecuteResume(wfName string, flowId string, event string)
func (*FlowEngine) ExecuteResumeAfterWait ¶
func (f *FlowEngine) ExecuteResumeAfterWait(wfName string, flowId string, event string) error
func (*FlowEngine) ExecuteRetry ¶
func (f *FlowEngine) ExecuteRetry(wfName string, flowId string, actionId int)
func (*FlowEngine) ExecuteSystemAction ¶
func (f *FlowEngine) ExecuteSystemAction(wfName string, flowId string, actionId int)
func (*FlowEngine) MarkComplete ¶
func (f *FlowEngine) MarkComplete(wfName string, flowId string, successhandler flow.Statehandler)
func (*FlowEngine) MarkFailed ¶
func (f *FlowEngine) MarkFailed(wfName string, flowId string)
func (*FlowEngine) MarkPaused ¶
func (f *FlowEngine) MarkPaused(wfName string, flowId string)
func (*FlowEngine) MarkRunning ¶
func (f *FlowEngine) MarkRunning(wfName string, flowId string)
func (*FlowEngine) MarkWaitingDelay ¶
func (f *FlowEngine) MarkWaitingDelay(wfName string, flowId string)
func (*FlowEngine) MarkWaitingEvent ¶
func (f *FlowEngine) MarkWaitingEvent(wfName string, flowId string, event string)
func (*FlowEngine) RetryFailedAction ¶
func (f *FlowEngine) RetryFailedAction(wfName string, flowId string, actionName string, actionId int)
func (*FlowEngine) RetryTimedoutAction ¶
func (f *FlowEngine) RetryTimedoutAction(wfName string, flowId string, actionName string, actionId int)
type FlowStateMachine ¶
type FlowStateMachine struct {
// contains filtered or unexported fields
}
func NewFlowStateMachine ¶
func NewFlowStateMachine(workflow string, id string, context *model.FlowContext, flow *flow.Flow) *FlowStateMachine
func (*FlowStateMachine) ChangeState ¶
func (fm *FlowStateMachine) ChangeState(state model.FlowState)
func (*FlowStateMachine) MoveForward ¶
func (*FlowStateMachine) SaveEvent ¶
func (fm *FlowStateMachine) SaveEvent(event string)
func (*FlowStateMachine) Validate ¶
func (fm *FlowStateMachine) Validate(actionId int) error
type FlowStateMachineContainer ¶
type FlowStateMachineContainer struct {
// contains filtered or unexported fields
}
func NewFlowStateMachineContainer ¶
func NewFlowStateMachineContainer(storage Storage, metadataService metadata.MetadataService) *FlowStateMachineContainer
func (*FlowStateMachineContainer) Delete ¶
func (sc *FlowStateMachineContainer) Delete(wf string, flowId string)
func (*FlowStateMachineContainer) Get ¶
func (sc *FlowStateMachineContainer) Get(wf string, flowId string) (*FlowStateMachine, error)
func (*FlowStateMachineContainer) Init ¶
func (sc *FlowStateMachineContainer) Init(wf string, flowId string, input map[string]any) (*FlowStateMachine, error)
func (*FlowStateMachineContainer) Store ¶
func (sc *FlowStateMachineContainer) Store(wf string, flowId string, m *FlowStateMachine)
type Shard ¶
type Shard struct {
// contains filtered or unexported fields
}
func NewShard ¶
func NewShard(id string, externalQueue ExternalQueue, storage Storage, engine *FlowEngine, stateHandler *StateHandlerContainer) *Shard
func (*Shard) GetEngine ¶
func (s *Shard) GetEngine() *FlowEngine
func (*Shard) GetExternalQueue ¶
func (s *Shard) GetExternalQueue() ExternalQueue
func (*Shard) GetShardId ¶
func (*Shard) GetStorage ¶
func (*Shard) RegisterExecutor ¶
type StateHandlerContainer ¶
type StateHandlerContainer struct {
// contains filtered or unexported fields
}
func NewStateHandlerContainer ¶
func NewStateHandlerContainer(storage Storage) *StateHandlerContainer
func (*StateHandlerContainer) GetHandler ¶
func (s *StateHandlerContainer) GetHandler(st flow.Statehandler) func(wfName string, wfId string) error
type Storage ¶
type Storage interface {
SaveFlowContext(wfName string, flowId string, flowCtx *model.FlowContext) error
GetFlowContext(wfName string, flowId string) (*model.FlowContext, error)
DeleteFlowContext(wfName string, flowId string) error
SaveFlowContextAndDispatchAction(wfName string, flowId string, flowCtx *model.FlowContext, actions []model.ActionExecutionRequest) error
PollAction(actionType string, batchSize int) ([]model.ActionExecutionRequest, error)
Ack(actionType string, actions []model.ActionExecutionRequest) error
Retry(wfName string, flowId string, actionName string, actionId int, delay time.Duration) error
PollRetry() ([]model.ActionExecutionRequest, error)
Delay(wfName string, flowId string, actionName string, actionId int, delay time.Duration) error
PollDelay() ([]model.ActionExecutionRequest, error)
Timeout(wfName string, flowId string, actionName string, actionId int, delay time.Duration) error
PollTimeout() ([]model.ActionExecutionRequest, error)
}
Click to show internal directories.
Click to hide internal directories.