Documentation ¶
Index ¶
- type CancelableCommand
- type Command
- type CommandResult
- type CommandState
- type CompleteWorkflowCommand
- func (c *CompleteWorkflowCommand) Commit()
- func (c *CompleteWorkflowCommand) Done()
- func (c *CompleteWorkflowCommand) Execute(clock clock.Clock) *CommandResult
- func (c *CompleteWorkflowCommand) ID() int64
- func (c *CompleteWorkflowCommand) State() CommandState
- func (c *CompleteWorkflowCommand) Type() string
- func (c *CompleteWorkflowCommand) WhenDone(fn func())
- type ContinueAsNewCommand
- func (c *ContinueAsNewCommand) Commit()
- func (c *ContinueAsNewCommand) Done()
- func (c *ContinueAsNewCommand) Execute(clock clock.Clock) *CommandResult
- func (c *ContinueAsNewCommand) ID() int64
- func (c *ContinueAsNewCommand) State() CommandState
- func (c *ContinueAsNewCommand) Type() string
- func (c *ContinueAsNewCommand) WhenDone(fn func())
- type ScheduleActivityCommand
- func (c *ScheduleActivityCommand) Commit()
- func (c *ScheduleActivityCommand) Done()
- func (c *ScheduleActivityCommand) Execute(clock clock.Clock) *CommandResult
- func (c *ScheduleActivityCommand) ID() int64
- func (c *ScheduleActivityCommand) State() CommandState
- func (c *ScheduleActivityCommand) Type() string
- func (c *ScheduleActivityCommand) WhenDone(fn func())
- type ScheduleSubWorkflowCommand
- type ScheduleTimerCommand
- type SideEffectCommand
- func (c *SideEffectCommand) Commit()
- func (c *SideEffectCommand) Done()
- func (c *SideEffectCommand) Execute(clock clock.Clock) *CommandResult
- func (c *SideEffectCommand) ID() int64
- func (c *SideEffectCommand) SetResult(result payload.Payload)
- func (c *SideEffectCommand) State() CommandState
- func (c *SideEffectCommand) Type() string
- func (c *SideEffectCommand) WhenDone(fn func())
- type StartTraceCommand
- func (c *StartTraceCommand) Commit()
- func (c *StartTraceCommand) Done()
- func (c *StartTraceCommand) Execute(clock clock.Clock) *CommandResult
- func (c *StartTraceCommand) ID() int64
- func (c *StartTraceCommand) SetSpanID(spanID payload.Payload)
- func (c *StartTraceCommand) State() CommandState
- func (c *StartTraceCommand) Type() string
- func (c *StartTraceCommand) WhenDone(fn func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelableCommand ¶ added in v0.5.1
type CancelableCommand interface { Command // Cancel cancels the command. Cancel() // HandleCancel handles a cancel event during replay HandleCancel() }
type Command ¶
type Command interface { ID() int64 Type() string // State returns the current state of the command. State() CommandState // Execute processes the command in its current state and moves it to the next state. Execute(clock.Clock) *CommandResult // Commit marks the command as committed without executing it. Commit() // Done marks the command as done. This transitions the state to done and indicates that the result // of this command has been applied. Done() WhenDone(fn func()) }
type CommandResult ¶ added in v0.4.0
type CommandResult struct { State core.WorkflowInstanceState Events []*history.Event ActivityEvents []*history.Event TimerEvents []*history.Event WorkflowEvents []*history.WorkflowEvent }
type CommandState ¶
type CommandState int
const ( CommandState_Pending CommandState = iota CommandState_Committed CommandState_CancelPending CommandState_Canceled CommandState_Done )
func (CommandState) String ¶ added in v0.5.1
func (cs CommandState) String() string
type CompleteWorkflowCommand ¶ added in v0.4.0
type CompleteWorkflowCommand struct { Instance *core.WorkflowInstance Result payload.Payload Error *workflowerrors.Error // contains filtered or unexported fields }
func NewCompleteWorkflowCommand ¶
func NewCompleteWorkflowCommand(id int64, instance *core.WorkflowInstance, result payload.Payload, err *workflowerrors.Error) *CompleteWorkflowCommand
func (*CompleteWorkflowCommand) Commit ¶ added in v0.4.0
func (c *CompleteWorkflowCommand) Commit()
func (*CompleteWorkflowCommand) Execute ¶ added in v0.5.1
func (c *CompleteWorkflowCommand) Execute(clock clock.Clock) *CommandResult
func (*CompleteWorkflowCommand) State ¶ added in v0.4.0
func (c *CompleteWorkflowCommand) State() CommandState
type ContinueAsNewCommand ¶ added in v0.15.0
type ContinueAsNewCommand struct { Instance *core.WorkflowInstance Name string Metadata *metadata.WorkflowMetadata Inputs []payload.Payload Result payload.Payload ContinuedExecutionID string // contains filtered or unexported fields }
func NewContinueAsNewCommand ¶ added in v0.15.0
func NewContinueAsNewCommand(id int64, instance *core.WorkflowInstance, result payload.Payload, name string, metadata *metadata.WorkflowMetadata, inputs []payload.Payload) *ContinueAsNewCommand
func (*ContinueAsNewCommand) Execute ¶ added in v0.15.0
func (c *ContinueAsNewCommand) Execute(clock clock.Clock) *CommandResult
func (*ContinueAsNewCommand) State ¶ added in v0.15.0
func (c *ContinueAsNewCommand) State() CommandState
type ScheduleActivityCommand ¶ added in v0.4.0
type ScheduleActivityCommand struct { Name string Inputs []payload.Payload Attempt int Metadata *metadata.WorkflowMetadata Queue core.Queue // contains filtered or unexported fields }
func NewScheduleActivityCommand ¶ added in v0.4.0
func NewScheduleActivityCommand(id int64, name string, inputs []payload.Payload, attempt int, metadata *metadata.WorkflowMetadata, queue core.Queue) *ScheduleActivityCommand
func (*ScheduleActivityCommand) Execute ¶ added in v0.5.1
func (c *ScheduleActivityCommand) Execute(clock clock.Clock) *CommandResult
func (*ScheduleActivityCommand) State ¶ added in v0.4.0
func (c *ScheduleActivityCommand) State() CommandState
type ScheduleSubWorkflowCommand ¶ added in v0.4.0
type ScheduleSubWorkflowCommand struct { Queue core.Queue Instance *core.WorkflowInstance Metadata *metadata.WorkflowMetadata WorkflowSpanID [8]byte Name string Inputs []payload.Payload // contains filtered or unexported fields }
func NewScheduleSubWorkflowCommand ¶
func NewScheduleSubWorkflowCommand( id int64, parentInstance *core.WorkflowInstance, subWorkflowQueue core.Queue, subWorkflowInstanceID, name string, inputs []payload.Payload, metadata *metadata.WorkflowMetadata, workflowSpanID [8]byte, ) *ScheduleSubWorkflowCommand
func (*ScheduleSubWorkflowCommand) Cancel ¶ added in v0.5.1
func (c *ScheduleSubWorkflowCommand) Cancel()
func (*ScheduleSubWorkflowCommand) Done ¶ added in v0.4.0
func (c *ScheduleSubWorkflowCommand) Done()
func (*ScheduleSubWorkflowCommand) Execute ¶ added in v0.5.1
func (c *ScheduleSubWorkflowCommand) Execute(clock clock.Clock) *CommandResult
func (*ScheduleSubWorkflowCommand) HandleCancel ¶ added in v0.5.1
func (c *ScheduleSubWorkflowCommand) HandleCancel()
type ScheduleTimerCommand ¶ added in v0.4.0
type ScheduleTimerCommand struct {
// contains filtered or unexported fields
}
func NewScheduleTimerCommand ¶
func (*ScheduleTimerCommand) Execute ¶ added in v0.5.1
func (c *ScheduleTimerCommand) Execute(clock clock.Clock) *CommandResult
func (*ScheduleTimerCommand) HandleCancel ¶ added in v0.5.1
func (c *ScheduleTimerCommand) HandleCancel()
type SideEffectCommand ¶ added in v0.4.1
type SideEffectCommand struct {
// contains filtered or unexported fields
}
func NewSideEffectCommand ¶
func NewSideEffectCommand(id int64) *SideEffectCommand
func (*SideEffectCommand) Commit ¶ added in v0.4.1
func (c *SideEffectCommand) Commit()
func (*SideEffectCommand) Done ¶ added in v0.4.1
func (c *SideEffectCommand) Done()
func (*SideEffectCommand) Execute ¶ added in v0.5.1
func (c *SideEffectCommand) Execute(clock clock.Clock) *CommandResult
func (*SideEffectCommand) SetResult ¶ added in v0.5.0
func (c *SideEffectCommand) SetResult(result payload.Payload)
func (*SideEffectCommand) State ¶ added in v0.4.1
func (c *SideEffectCommand) State() CommandState
type StartTraceCommand ¶ added in v0.19.0
type StartTraceCommand struct {
// contains filtered or unexported fields
}
func NewStartTraceCommand ¶ added in v0.19.0
func NewStartTraceCommand(id int64) *StartTraceCommand
func (*StartTraceCommand) Commit ¶ added in v0.19.0
func (c *StartTraceCommand) Commit()
func (*StartTraceCommand) Done ¶ added in v0.19.0
func (c *StartTraceCommand) Done()
func (*StartTraceCommand) Execute ¶ added in v0.19.0
func (c *StartTraceCommand) Execute(clock clock.Clock) *CommandResult
func (*StartTraceCommand) SetSpanID ¶ added in v0.19.0
func (c *StartTraceCommand) SetSpanID(spanID payload.Payload)
func (*StartTraceCommand) State ¶ added in v0.19.0
func (c *StartTraceCommand) State() CommandState
Click to show internal directories.
Click to hide internal directories.