Documentation
¶
Index ¶
- Constants
- Variables
- type DemoChildWorkflow
- func (w *DemoChildWorkflow) ChildFinish(ctx context.Context) (*models.NextState, error)
- func (w *DemoChildWorkflow) ChildInit(ctx context.Context) (*models.NextState, error)
- func (w *DemoChildWorkflow) ChildProcessing(ctx context.Context) (*models.NextState, error)
- func (w *DemoChildWorkflow) ChildWakeParent(ctx context.Context) (*models.NextState, error)
- func (w *DemoChildWorkflow) Description() string
- func (w *DemoChildWorkflow) GetAllStates() []models.WorkflowState
- func (w *DemoChildWorkflow) GetChildWorkflows(ctx context.Context) ([]domain.Workflow, error)
- func (w *DemoChildWorkflow) GetRetryConfig() models.RetryConfig
- func (w *DemoChildWorkflow) GetStateVariables() map[string]string
- func (w *DemoChildWorkflow) GetWorkflowData() *domain.Workflow
- func (w *DemoChildWorkflow) InitialState() string
- func (w *DemoChildWorkflow) Setup(wf *domain.Workflow)
- func (w *DemoChildWorkflow) StateTransitions() map[string][]string
- type DemoParentWorkflow
- func (w *DemoParentWorkflow) Description() string
- func (w *DemoParentWorkflow) GetAllStates() []models.WorkflowState
- func (w *DemoParentWorkflow) GetChildWorkflows(ctx context.Context) ([]domain.Workflow, error)
- func (w *DemoParentWorkflow) GetRetryConfig() models.RetryConfig
- func (w *DemoParentWorkflow) GetStateVariables() map[string]string
- func (w *DemoParentWorkflow) GetWorkflowData() *domain.Workflow
- func (w *DemoParentWorkflow) InitialState() string
- func (w *DemoParentWorkflow) ParentFinish(ctx context.Context) (*models.NextState, error)
- func (w *DemoParentWorkflow) ParentInit(ctx context.Context) (*models.NextState, error)
- func (w *DemoParentWorkflow) ParentSpawnChildren(ctx context.Context) (*models.NextState, error)
- func (w *DemoParentWorkflow) ParentWaitForChildren(ctx context.Context) (*models.NextState, error)
- func (w *DemoParentWorkflow) Setup(wf *domain.Workflow)
- func (w *DemoParentWorkflow) StateTransitions() map[string][]string
- func (w *DemoParentWorkflow) WakeParent(ctx context.Context) error
- type DemoWorkflow
- func (m *DemoWorkflow) Approve(ctx context.Context) (*models.NextState, error)
- func (m *DemoWorkflow) Description() string
- func (m *DemoWorkflow) GetAllStates() []models.WorkflowState
- func (m *DemoWorkflow) GetRetryConfig() models.RetryConfig
- func (m *DemoWorkflow) GetStateVariables() map[string]string
- func (m *DemoWorkflow) GetWorkflowData() *domain.Workflow
- func (m *DemoWorkflow) Init(ctx context.Context) (*models.NextState, error)
- func (m *DemoWorkflow) InitialState() string
- func (m *DemoWorkflow) Review(ctx context.Context) (*models.NextState, error)
- func (m *DemoWorkflow) Setup(wf *domain.Workflow)
- func (m *DemoWorkflow) StateTransitions() map[string][]string
- type EnrollmentStruct
- type GetIpWorkflow
- func (m *GetIpWorkflow) Description() string
- func (m *GetIpWorkflow) GetAllStates() []models.WorkflowState
- func (m *GetIpWorkflow) GetRetryConfig() models.RetryConfig
- func (m *GetIpWorkflow) GetStateVariables() map[string]string
- func (m *GetIpWorkflow) GetWorkflowData() *domain.Workflow
- func (m *GetIpWorkflow) Init(ctx context.Context) (*models.NextState, error)
- func (m *GetIpWorkflow) InitialState() string
- func (m *GetIpWorkflow) Setup(wf *domain.Workflow)
- func (m *GetIpWorkflow) StateGetIpData(ctx context.Context) (*models.NextState, error)
- func (m *GetIpWorkflow) StateTransitions() map[string][]string
Constants ¶
const ( ChildInit = "ChildInit" ChildProcessing = "ChildProcessing" ChildWakeParent = "ChildWakeParent" ChildFinish = "ChildFinish" )
State constants for child workflow
const ( ParentInit = "ParentInit" ParentSpawnChildren = "ParentSpawnChildren" ParentWaitForChildren = "ParentWaitForChildren" ParentFinish = "ParentFinish" )
State constants for parent workflow
const VAR_AGE = "age"
const VAR_IP = "ip"
const VAR_NAME = "name"
Variables ¶
var StateApprove string = "Approve"
var StateApproveError string = "ApproveError"
var StateFinish string = "Finish"
Define a named string type
var StateGetIpData string = "StateGetIpData"
Define a named string type
var StateInit string = "Init"
var StateReview string = "Review"
Functions ¶
This section is empty.
Types ¶
type DemoChildWorkflow ¶ added in v1.5.0
type DemoChildWorkflow struct {
core.BaseWorkflow
Clock core.Clock
}
DemoChildWorkflow is a demonstration of a child workflow that wakes its parent
func (*DemoChildWorkflow) ChildFinish ¶ added in v1.5.0
ChildFinish finishes the child workflow
func (*DemoChildWorkflow) ChildProcessing ¶ added in v1.5.0
ChildProcessing performs the child workflow's task (simulated with a delay)
func (*DemoChildWorkflow) ChildWakeParent ¶ added in v1.5.0
ChildWakeParent wakes the parent workflow
func (*DemoChildWorkflow) Description ¶ added in v1.5.0
func (w *DemoChildWorkflow) Description() string
func (*DemoChildWorkflow) GetAllStates ¶ added in v1.5.0
func (w *DemoChildWorkflow) GetAllStates() []models.WorkflowState
func (*DemoChildWorkflow) GetChildWorkflows ¶ added in v1.5.0
GetChildWorkflows implements the ParentChildCapable interface
func (*DemoChildWorkflow) GetRetryConfig ¶ added in v1.5.0
func (w *DemoChildWorkflow) GetRetryConfig() models.RetryConfig
func (*DemoChildWorkflow) GetStateVariables ¶ added in v1.5.0
func (w *DemoChildWorkflow) GetStateVariables() map[string]string
func (*DemoChildWorkflow) GetWorkflowData ¶ added in v1.5.0
func (w *DemoChildWorkflow) GetWorkflowData() *domain.Workflow
func (*DemoChildWorkflow) InitialState ¶ added in v1.5.0
func (w *DemoChildWorkflow) InitialState() string
func (*DemoChildWorkflow) Setup ¶ added in v1.5.0
func (w *DemoChildWorkflow) Setup(wf *domain.Workflow)
func (*DemoChildWorkflow) StateTransitions ¶ added in v1.5.0
func (w *DemoChildWorkflow) StateTransitions() map[string][]string
type DemoParentWorkflow ¶ added in v1.5.0
type DemoParentWorkflow struct {
core.BaseWorkflow
Clock core.Clock
// contains filtered or unexported fields
}
DemoParentWorkflow is a demonstration of a parent workflow that creates child workflows
func (*DemoParentWorkflow) Description ¶ added in v1.5.0
func (w *DemoParentWorkflow) Description() string
func (*DemoParentWorkflow) GetAllStates ¶ added in v1.5.0
func (w *DemoParentWorkflow) GetAllStates() []models.WorkflowState
func (*DemoParentWorkflow) GetChildWorkflows ¶ added in v1.5.0
GetChildWorkflows implements the ParentChildCapable interface
func (*DemoParentWorkflow) GetRetryConfig ¶ added in v1.5.0
func (w *DemoParentWorkflow) GetRetryConfig() models.RetryConfig
func (*DemoParentWorkflow) GetStateVariables ¶ added in v1.5.0
func (w *DemoParentWorkflow) GetStateVariables() map[string]string
func (*DemoParentWorkflow) GetWorkflowData ¶ added in v1.5.0
func (w *DemoParentWorkflow) GetWorkflowData() *domain.Workflow
func (*DemoParentWorkflow) InitialState ¶ added in v1.5.0
func (w *DemoParentWorkflow) InitialState() string
func (*DemoParentWorkflow) ParentFinish ¶ added in v1.5.0
ParentFinish finishes the workflow
func (*DemoParentWorkflow) ParentInit ¶ added in v1.5.0
ParentInit initializes the parent workflow
func (*DemoParentWorkflow) ParentSpawnChildren ¶ added in v1.5.0
ParentSpawnChildren creates two child workflows
func (*DemoParentWorkflow) ParentWaitForChildren ¶ added in v1.5.0
ParentWaitForChildren checks if all children are complete
func (*DemoParentWorkflow) Setup ¶ added in v1.5.0
func (w *DemoParentWorkflow) Setup(wf *domain.Workflow)
func (*DemoParentWorkflow) StateTransitions ¶ added in v1.5.0
func (w *DemoParentWorkflow) StateTransitions() map[string][]string
func (*DemoParentWorkflow) WakeParent ¶ added in v1.5.0
func (w *DemoParentWorkflow) WakeParent(ctx context.Context) error
WakeParent implements the ParentChildCapable interface
type DemoWorkflow ¶
type DemoWorkflow struct {
core.BaseWorkflow
Clock core.Clock
}
func (*DemoWorkflow) Description ¶
func (m *DemoWorkflow) Description() string
func (*DemoWorkflow) GetAllStates ¶
func (m *DemoWorkflow) GetAllStates() []models.WorkflowState
func (*DemoWorkflow) GetRetryConfig ¶
func (m *DemoWorkflow) GetRetryConfig() models.RetryConfig
func (*DemoWorkflow) GetStateVariables ¶
func (m *DemoWorkflow) GetStateVariables() map[string]string
func (*DemoWorkflow) GetWorkflowData ¶
func (m *DemoWorkflow) GetWorkflowData() *domain.Workflow
func (*DemoWorkflow) InitialState ¶
func (m *DemoWorkflow) InitialState() string
func (*DemoWorkflow) Setup ¶
func (m *DemoWorkflow) Setup(wf *domain.Workflow)
func (*DemoWorkflow) StateTransitions ¶
func (m *DemoWorkflow) StateTransitions() map[string][]string
type EnrollmentStruct ¶
type GetIpWorkflow ¶
type GetIpWorkflow struct {
core.BaseWorkflow
}
func (*GetIpWorkflow) Description ¶
func (m *GetIpWorkflow) Description() string
func (*GetIpWorkflow) GetAllStates ¶
func (m *GetIpWorkflow) GetAllStates() []models.WorkflowState
func (*GetIpWorkflow) GetRetryConfig ¶
func (m *GetIpWorkflow) GetRetryConfig() models.RetryConfig
func (*GetIpWorkflow) GetStateVariables ¶
func (m *GetIpWorkflow) GetStateVariables() map[string]string
func (*GetIpWorkflow) GetWorkflowData ¶
func (m *GetIpWorkflow) GetWorkflowData() *domain.Workflow
func (*GetIpWorkflow) InitialState ¶
func (m *GetIpWorkflow) InitialState() string
func (*GetIpWorkflow) Setup ¶
func (m *GetIpWorkflow) Setup(wf *domain.Workflow)
func (*GetIpWorkflow) StateGetIpData ¶
func (*GetIpWorkflow) StateTransitions ¶
func (m *GetIpWorkflow) StateTransitions() map[string][]string