Documentation
¶
Index ¶
- Constants
- Variables
- func GetWfAndExpectState(t *testing.T, port int, url string, wf models.CreateWorkflowResponse, ...)
- type ChildWorkflow
- func (w *ChildWorkflow) ChildInit(ctx context.Context) (*models.NextState, error)
- func (w *ChildWorkflow) ChildProcessing(ctx context.Context) (*models.NextState, error)
- func (w *ChildWorkflow) ChildWakeParent(ctx context.Context) (*models.NextState, error)
- func (w *ChildWorkflow) Description() string
- func (w *ChildWorkflow) GetAllStates() []models.WorkflowState
- func (w *ChildWorkflow) GetRetryConfig() models.RetryConfig
- func (w *ChildWorkflow) GetStateVariables() map[string]string
- func (w *ChildWorkflow) GetWorkflowData() *domain.Workflow
- func (w *ChildWorkflow) InitialState() string
- func (w *ChildWorkflow) Setup(wf *domain.Workflow)
- func (w *ChildWorkflow) StateTransitions() map[string][]string
- func (w *ChildWorkflow) WakeParent(ctx context.Context) error
- type ParentWorkflow
- func (w *ParentWorkflow) Description() string
- func (w *ParentWorkflow) GetAllStates() []models.WorkflowState
- func (w *ParentWorkflow) GetChildWorkflows(ctx context.Context) ([]domain.Workflow, error)
- func (w *ParentWorkflow) GetRetryConfig() models.RetryConfig
- func (w *ParentWorkflow) GetStateVariables() map[string]string
- func (w *ParentWorkflow) GetWorkflowData() *domain.Workflow
- func (w *ParentWorkflow) InitialState() string
- func (w *ParentWorkflow) ParentInit(ctx context.Context) (*models.NextState, error)
- func (w *ParentWorkflow) ParentProcessChildrenResults(ctx context.Context) (*models.NextState, error)
- func (w *ParentWorkflow) ParentSpawnChildren(ctx context.Context) (*models.NextState, error)
- func (w *ParentWorkflow) ParentWaitForChildren(ctx context.Context) (*models.NextState, error)
- func (w *ParentWorkflow) Setup(wf *domain.Workflow)
- func (w *ParentWorkflow) StateTransitions() map[string][]string
- type QuickWorkflow
- func (m *QuickWorkflow) Description() string
- func (m *QuickWorkflow) GetAllStates() []models.WorkflowState
- func (m *QuickWorkflow) GetRetryConfig() models.RetryConfig
- func (m *QuickWorkflow) GetStateVariables() map[string]string
- func (m *QuickWorkflow) GetWorkflowData() *domain.Workflow
- func (m *QuickWorkflow) Init(ctx context.Context) (*models.NextState, error)
- func (m *QuickWorkflow) InitialState() string
- func (m *QuickWorkflow) Setup(wf *domain.Workflow)
- func (m *QuickWorkflow) StateGetIpData(ctx context.Context) (*models.NextState, error)
- func (m *QuickWorkflow) StateTransitions() map[string][]string
- type RepairWorkflow
- func (m *RepairWorkflow) Description() string
- func (m *RepairWorkflow) GetAllStates() []models.WorkflowState
- func (m *RepairWorkflow) GetRetryConfig() models.RetryConfig
- func (m *RepairWorkflow) GetStateVariables() map[string]string
- func (m *RepairWorkflow) GetWorkflowData() *domain.Workflow
- func (m *RepairWorkflow) Init(ctx context.Context) (*models.NextState, error)
- func (m *RepairWorkflow) InitialState() string
- func (m *RepairWorkflow) Setup(wf *domain.Workflow)
- func (m *RepairWorkflow) StateGetIpData(ctx context.Context) (*models.NextState, error)
- func (m *RepairWorkflow) StateTransitions() map[string][]string
- type TestRepository
- type WaitWorkflow
- func (m *WaitWorkflow) Description() string
- func (m *WaitWorkflow) GetAllStates() []models.WorkflowState
- func (m *WaitWorkflow) GetRetryConfig() models.RetryConfig
- func (m *WaitWorkflow) GetStateVariables() map[string]string
- func (m *WaitWorkflow) GetWorkflowData() *domain.Workflow
- func (m *WaitWorkflow) Init(ctx context.Context) (*models.NextState, error)
- func (m *WaitWorkflow) InitialState() string
- func (m *WaitWorkflow) Setup(wf *domain.Workflow)
- func (m *WaitWorkflow) StateGetIpData(ctx context.Context) (*models.NextState, error)
- func (m *WaitWorkflow) StateTransitions() map[string][]string
Constants ¶
const ( ParentInit = "ParentInit" ParentSpawnChildren = "ParentSpawnChildren" ParentWaitForChildren = "ParentWaitForChildren" ParentProcessChildrenResults = "ParentProcessChildrenResults" ParentFinish = "ParentFinish" )
State constants for parent workflow
const ( ChildInit = "ChildInit" ChildProcessing = "ChildProcessing" ChildWakeParent = "ChildWakeParent" ChildFinish = "ChildFinish" )
State constants for child workflow
const VAR_IP = "ip"
Variables ¶
var StateApprove string = "Approve"
var StateApproveError string = "ApproveError"
var StateFinish string = "Finish"
var StateGetIpData string = "StateGetIpData"
Define a named string type
var StateInit string = "Init"
var StateReview string = "Review"
Functions ¶
Types ¶
type ChildWorkflow ¶ added in v1.5.0
type ChildWorkflow struct {
core.BaseWorkflow
// contains filtered or unexported fields
}
ChildWorkflow represents a child workflow
func NewChildWorkflow ¶ added in v1.5.0
func NewChildWorkflow(repo *TestRepository) *ChildWorkflow
NewChildWorkflow creates a new instance of ChildWorkflow
func (*ChildWorkflow) ChildProcessing ¶ added in v1.5.0
ChildProcessing performs the child workflow's task
func (*ChildWorkflow) ChildWakeParent ¶ added in v1.5.0
ChildWakeParent wakes the parent workflow
func (*ChildWorkflow) Description ¶ added in v1.5.0
func (w *ChildWorkflow) Description() string
func (*ChildWorkflow) GetAllStates ¶ added in v1.5.0
func (w *ChildWorkflow) GetAllStates() []models.WorkflowState
func (*ChildWorkflow) GetRetryConfig ¶ added in v1.5.0
func (w *ChildWorkflow) GetRetryConfig() models.RetryConfig
func (*ChildWorkflow) GetStateVariables ¶ added in v1.5.0
func (w *ChildWorkflow) GetStateVariables() map[string]string
func (*ChildWorkflow) GetWorkflowData ¶ added in v1.5.0
func (w *ChildWorkflow) GetWorkflowData() *domain.Workflow
func (*ChildWorkflow) InitialState ¶ added in v1.5.0
func (w *ChildWorkflow) InitialState() string
func (*ChildWorkflow) Setup ¶ added in v1.5.0
func (w *ChildWorkflow) Setup(wf *domain.Workflow)
Setup initializes the workflow with domain data
func (*ChildWorkflow) StateTransitions ¶ added in v1.5.0
func (w *ChildWorkflow) StateTransitions() map[string][]string
func (*ChildWorkflow) WakeParent ¶ added in v1.5.0
func (w *ChildWorkflow) WakeParent(ctx context.Context) error
WakeParent implements the ParentChildCapable interface
type ParentWorkflow ¶ added in v1.5.0
type ParentWorkflow struct {
core.BaseWorkflow
// contains filtered or unexported fields
}
ParentWorkflow represents a workflow that spawns child workflows
func NewParentWorkflow ¶ added in v1.5.0
func NewParentWorkflow(repo *TestRepository) *ParentWorkflow
NewParentWorkflow creates a new instance of ParentWorkflow
func (*ParentWorkflow) Description ¶ added in v1.5.0
func (w *ParentWorkflow) Description() string
func (*ParentWorkflow) GetAllStates ¶ added in v1.5.0
func (w *ParentWorkflow) GetAllStates() []models.WorkflowState
func (*ParentWorkflow) GetChildWorkflows ¶ added in v1.5.0
GetChildWorkflows implements the ParentChildCapable interface
func (*ParentWorkflow) GetRetryConfig ¶ added in v1.5.0
func (w *ParentWorkflow) GetRetryConfig() models.RetryConfig
func (*ParentWorkflow) GetStateVariables ¶ added in v1.5.0
func (w *ParentWorkflow) GetStateVariables() map[string]string
func (*ParentWorkflow) GetWorkflowData ¶ added in v1.5.0
func (w *ParentWorkflow) GetWorkflowData() *domain.Workflow
func (*ParentWorkflow) InitialState ¶ added in v1.5.0
func (w *ParentWorkflow) InitialState() string
func (*ParentWorkflow) ParentInit ¶ added in v1.5.0
ParentInit initializes the parent workflow
func (*ParentWorkflow) ParentProcessChildrenResults ¶ added in v1.5.0
func (w *ParentWorkflow) ParentProcessChildrenResults(ctx context.Context) (*models.NextState, error)
ParentProcessChildrenResults processes results from child workflows
func (*ParentWorkflow) ParentSpawnChildren ¶ added in v1.5.0
ParentSpawnChildren spawns child workflows
func (*ParentWorkflow) ParentWaitForChildren ¶ added in v1.5.0
ParentWaitForChildren waits for child workflows to complete
func (*ParentWorkflow) Setup ¶ added in v1.5.0
func (w *ParentWorkflow) Setup(wf *domain.Workflow)
Setup initializes the workflow with domain data
func (*ParentWorkflow) StateTransitions ¶ added in v1.5.0
func (w *ParentWorkflow) StateTransitions() map[string][]string
type QuickWorkflow ¶
type QuickWorkflow struct {
core.BaseWorkflow
}
func (*QuickWorkflow) Description ¶
func (m *QuickWorkflow) Description() string
func (*QuickWorkflow) GetAllStates ¶
func (m *QuickWorkflow) GetAllStates() []models.WorkflowState
func (*QuickWorkflow) GetRetryConfig ¶
func (m *QuickWorkflow) GetRetryConfig() models.RetryConfig
func (*QuickWorkflow) GetStateVariables ¶
func (m *QuickWorkflow) GetStateVariables() map[string]string
func (*QuickWorkflow) GetWorkflowData ¶
func (m *QuickWorkflow) GetWorkflowData() *domain.Workflow
func (*QuickWorkflow) InitialState ¶
func (m *QuickWorkflow) InitialState() string
func (*QuickWorkflow) Setup ¶
func (m *QuickWorkflow) Setup(wf *domain.Workflow)
func (*QuickWorkflow) StateGetIpData ¶
func (*QuickWorkflow) StateTransitions ¶
func (m *QuickWorkflow) StateTransitions() map[string][]string
type RepairWorkflow ¶ added in v1.5.0
type RepairWorkflow struct {
core.BaseWorkflow
Clock core.Clock
}
func (*RepairWorkflow) Description ¶ added in v1.5.0
func (m *RepairWorkflow) Description() string
func (*RepairWorkflow) GetAllStates ¶ added in v1.5.0
func (m *RepairWorkflow) GetAllStates() []models.WorkflowState
func (*RepairWorkflow) GetRetryConfig ¶ added in v1.5.0
func (m *RepairWorkflow) GetRetryConfig() models.RetryConfig
func (*RepairWorkflow) GetStateVariables ¶ added in v1.5.0
func (m *RepairWorkflow) GetStateVariables() map[string]string
func (*RepairWorkflow) GetWorkflowData ¶ added in v1.5.0
func (m *RepairWorkflow) GetWorkflowData() *domain.Workflow
func (*RepairWorkflow) InitialState ¶ added in v1.5.0
func (m *RepairWorkflow) InitialState() string
func (*RepairWorkflow) Setup ¶ added in v1.5.0
func (m *RepairWorkflow) Setup(wf *domain.Workflow)
func (*RepairWorkflow) StateGetIpData ¶ added in v1.5.0
func (*RepairWorkflow) StateTransitions ¶ added in v1.5.0
func (m *RepairWorkflow) StateTransitions() map[string][]string
type TestRepository ¶ added in v1.5.0
TestRepository is a mock repository for testing purposes
type WaitWorkflow ¶
type WaitWorkflow struct {
core.BaseWorkflow
}
func (*WaitWorkflow) Description ¶
func (m *WaitWorkflow) Description() string
func (*WaitWorkflow) GetAllStates ¶
func (m *WaitWorkflow) GetAllStates() []models.WorkflowState
func (*WaitWorkflow) GetRetryConfig ¶
func (m *WaitWorkflow) GetRetryConfig() models.RetryConfig
func (*WaitWorkflow) GetStateVariables ¶
func (m *WaitWorkflow) GetStateVariables() map[string]string
func (*WaitWorkflow) GetWorkflowData ¶
func (m *WaitWorkflow) GetWorkflowData() *domain.Workflow
func (*WaitWorkflow) InitialState ¶
func (m *WaitWorkflow) InitialState() string
func (*WaitWorkflow) Setup ¶
func (m *WaitWorkflow) Setup(wf *domain.Workflow)
func (*WaitWorkflow) StateGetIpData ¶
func (*WaitWorkflow) StateTransitions ¶
func (m *WaitWorkflow) StateTransitions() map[string][]string