Documentation ¶
Index ¶
- func NewCancelEvent() cereal.CancelEvent
- func NewStartEvent() cereal.StartEvent
- func NewTaskCompleteEvent(taskName cereal.TaskName, tr cereal.TaskResult) cereal.TaskCompleteEvent
- func NewWorkflowExecutor(onStart func(w cereal.WorkflowInstance, ev cereal.StartEvent) cereal.Decision, ...) cereal.WorkflowExecutor
- type TaskResult
- func (tr *TaskResult) Err() error
- func (tr *TaskResult) Get(obj interface{}) error
- func (tr *TaskResult) GetParameters(obj interface{}) error
- func (tr *TaskResult) WithError(err error) *TaskResult
- func (tr *TaskResult) WithParameters(obj interface{}) *TaskResult
- func (tr *TaskResult) WithResult(obj interface{}) *TaskResult
- type TestableCompleteDecision
- type TestableContinueDecision
- type TestableDecision
- type TestableFailDecision
- type TestableTask
- type TestableTaskEnqueued
- type WorkflowInstance
- func (w *WorkflowInstance) AssertComplete() *TestableCompleteDecision
- func (w *WorkflowInstance) AssertContinuing() *TestableContinueDecision
- func (w *WorkflowInstance) AssertFailed() *TestableFailDecision
- func (w *WorkflowInstance) Complete(opts ...cereal.CompleteOpt) cereal.Decision
- func (w *WorkflowInstance) Continue(payload interface{}) cereal.Decision
- func (w *WorkflowInstance) EnqueueTask(taskName cereal.TaskName, parameters interface{}, ...) error
- func (w *WorkflowInstance) Fail(err error) cereal.Decision
- func (w *WorkflowInstance) GetParameters(obj interface{}) error
- func (w *WorkflowInstance) GetPayload(obj interface{}) error
- func (w *WorkflowInstance) InstanceName() string
- func (w *WorkflowInstance) ResetOutput()
- func (w *WorkflowInstance) TotalCompletedTasks() int
- func (w *WorkflowInstance) TotalEnqueuedTasks() int
- func (w *WorkflowInstance) WithNumCompletedTasks(numCompletedTasks int) *WorkflowInstance
- func (w *WorkflowInstance) WithNumEnqueuedTasks(numEnqueuedTasks int) *WorkflowInstance
- func (w *WorkflowInstance) WithParameters(obj interface{}) *WorkflowInstance
- func (w *WorkflowInstance) WithPayload(obj interface{}) *WorkflowInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCancelEvent ¶
func NewCancelEvent() cereal.CancelEvent
func NewStartEvent ¶
func NewStartEvent() cereal.StartEvent
func NewTaskCompleteEvent ¶
func NewTaskCompleteEvent(taskName cereal.TaskName, tr cereal.TaskResult) cereal.TaskCompleteEvent
func NewWorkflowExecutor ¶
func NewWorkflowExecutor( onStart func(w cereal.WorkflowInstance, ev cereal.StartEvent) cereal.Decision, onTaskComplete func(w cereal.WorkflowInstance, ev cereal.TaskCompleteEvent) cereal.Decision, onCancel func(w cereal.WorkflowInstance, ev cereal.CancelEvent) cereal.Decision, ) cereal.WorkflowExecutor
Types ¶
type TaskResult ¶
type TaskResult struct {
// contains filtered or unexported fields
}
func NewTaskResult ¶
func NewTaskResult(t *testing.T) *TaskResult
func (*TaskResult) Err ¶
func (tr *TaskResult) Err() error
func (*TaskResult) Get ¶
func (tr *TaskResult) Get(obj interface{}) error
func (*TaskResult) GetParameters ¶
func (tr *TaskResult) GetParameters(obj interface{}) error
func (*TaskResult) WithError ¶
func (tr *TaskResult) WithError(err error) *TaskResult
func (*TaskResult) WithParameters ¶
func (tr *TaskResult) WithParameters(obj interface{}) *TaskResult
func (*TaskResult) WithResult ¶
func (tr *TaskResult) WithResult(obj interface{}) *TaskResult
type TestableCompleteDecision ¶
type TestableCompleteDecision struct {
// contains filtered or unexported fields
}
func (*TestableCompleteDecision) GetResult ¶
func (d *TestableCompleteDecision) GetResult(obj interface{})
type TestableContinueDecision ¶
type TestableContinueDecision struct {
// contains filtered or unexported fields
}
func (*TestableContinueDecision) AssertNoTasksEnqueued ¶
func (d *TestableContinueDecision) AssertNoTasksEnqueued()
func (*TestableContinueDecision) AssertTaskEnqueued ¶
func (d *TestableContinueDecision) AssertTaskEnqueued(taskName cereal.TaskName) *TestableTaskEnqueued
func (*TestableContinueDecision) GetPayload ¶
func (d *TestableContinueDecision) GetPayload(obj interface{})
type TestableDecision ¶
type TestableDecision struct { Complete *TestableCompleteDecision Fail *TestableFailDecision Continue *TestableContinueDecision }
type TestableFailDecision ¶
type TestableFailDecision struct { Err error // contains filtered or unexported fields }
func (*TestableFailDecision) WithErrorEqual ¶
func (d *TestableFailDecision) WithErrorEqual(err error) *TestableFailDecision
type TestableTask ¶
type TestableTask struct { Name cereal.TaskName Opts cereal.TaskEnqueueOptions // contains filtered or unexported fields }
func (*TestableTask) GetParameters ¶
func (d *TestableTask) GetParameters(obj interface{})
type TestableTaskEnqueued ¶
type TestableTaskEnqueued struct { Tasks []*TestableTask // contains filtered or unexported fields }
func (*TestableTaskEnqueued) AssertCount ¶
func (t *TestableTaskEnqueued) AssertCount(c int) *TestableTaskEnqueued
type WorkflowInstance ¶
type WorkflowInstance struct {
// contains filtered or unexported fields
}
func NewWorkflowInstance ¶
func NewWorkflowInstance(t *testing.T, instanceName string) *WorkflowInstance
func (*WorkflowInstance) AssertComplete ¶
func (w *WorkflowInstance) AssertComplete() *TestableCompleteDecision
func (*WorkflowInstance) AssertContinuing ¶
func (w *WorkflowInstance) AssertContinuing() *TestableContinueDecision
func (*WorkflowInstance) AssertFailed ¶
func (w *WorkflowInstance) AssertFailed() *TestableFailDecision
func (*WorkflowInstance) Complete ¶
func (w *WorkflowInstance) Complete(opts ...cereal.CompleteOpt) cereal.Decision
func (*WorkflowInstance) Continue ¶
func (w *WorkflowInstance) Continue(payload interface{}) cereal.Decision
func (*WorkflowInstance) EnqueueTask ¶
func (w *WorkflowInstance) EnqueueTask(taskName cereal.TaskName, parameters interface{}, opts ...cereal.TaskEnqueueOpt) error
func (*WorkflowInstance) GetParameters ¶
func (w *WorkflowInstance) GetParameters(obj interface{}) error
func (*WorkflowInstance) GetPayload ¶
func (w *WorkflowInstance) GetPayload(obj interface{}) error
func (*WorkflowInstance) InstanceName ¶
func (w *WorkflowInstance) InstanceName() string
func (*WorkflowInstance) ResetOutput ¶
func (w *WorkflowInstance) ResetOutput()
func (*WorkflowInstance) TotalCompletedTasks ¶
func (w *WorkflowInstance) TotalCompletedTasks() int
func (*WorkflowInstance) TotalEnqueuedTasks ¶
func (w *WorkflowInstance) TotalEnqueuedTasks() int
func (*WorkflowInstance) WithNumCompletedTasks ¶
func (w *WorkflowInstance) WithNumCompletedTasks(numCompletedTasks int) *WorkflowInstance
func (*WorkflowInstance) WithNumEnqueuedTasks ¶
func (w *WorkflowInstance) WithNumEnqueuedTasks(numEnqueuedTasks int) *WorkflowInstance
func (*WorkflowInstance) WithParameters ¶
func (w *WorkflowInstance) WithParameters(obj interface{}) *WorkflowInstance
func (*WorkflowInstance) WithPayload ¶
func (w *WorkflowInstance) WithPayload(obj interface{}) *WorkflowInstance
Click to show internal directories.
Click to hide internal directories.