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
- 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
- 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
- type SignalWorkflowCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelableCommand ¶
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()
}
type CommandResult ¶
type CommandState ¶
type CommandState int
const ( CommandState_Pending CommandState = iota CommandState_Committed CommandState_CancelPending CommandState_Canceled CommandState_Done )
func (CommandState) String ¶
func (cs CommandState) String() string
type CompleteWorkflowCommand ¶
type CompleteWorkflowCommand struct {
Instance *core.WorkflowInstance
Result payload.Payload
Error string
// contains filtered or unexported fields
}
func NewCompleteWorkflowCommand ¶
func NewCompleteWorkflowCommand(id int64, instance *core.WorkflowInstance, result payload.Payload, err error) *CompleteWorkflowCommand
func (*CompleteWorkflowCommand) Commit ¶
func (c *CompleteWorkflowCommand) Commit()
func (*CompleteWorkflowCommand) Execute ¶
func (c *CompleteWorkflowCommand) Execute(clock clock.Clock) *CommandResult
func (*CompleteWorkflowCommand) State ¶
func (c *CompleteWorkflowCommand) State() CommandState
type ScheduleActivityCommand ¶
type ScheduleActivityCommand struct {
Name string
Inputs []payload.Payload
// contains filtered or unexported fields
}
func NewScheduleActivityCommand ¶
func NewScheduleActivityCommand(id int64, name string, inputs []payload.Payload) *ScheduleActivityCommand
func (*ScheduleActivityCommand) Execute ¶
func (c *ScheduleActivityCommand) Execute(clock clock.Clock) *CommandResult
func (*ScheduleActivityCommand) State ¶
func (c *ScheduleActivityCommand) State() CommandState
type ScheduleSubWorkflowCommand ¶
type ScheduleSubWorkflowCommand struct {
Instance *core.WorkflowInstance
Metadata *core.WorkflowMetadata
Name string
Inputs []payload.Payload
// contains filtered or unexported fields
}
func NewScheduleSubWorkflowCommand ¶
func NewScheduleSubWorkflowCommand( id int64, parentInstance *core.WorkflowInstance, subWorkflowInstanceID, name string, inputs []payload.Payload, metadata *core.WorkflowMetadata, ) *ScheduleSubWorkflowCommand
func (*ScheduleSubWorkflowCommand) Execute ¶
func (c *ScheduleSubWorkflowCommand) Execute(clock clock.Clock) *CommandResult
func (*ScheduleSubWorkflowCommand) HandleCancel ¶
func (c *ScheduleSubWorkflowCommand) HandleCancel()
type ScheduleTimerCommand ¶
type ScheduleTimerCommand struct {
// contains filtered or unexported fields
}
func NewScheduleTimerCommand ¶
func NewScheduleTimerCommand(id int64, at time.Time) *ScheduleTimerCommand
func (*ScheduleTimerCommand) Execute ¶
func (c *ScheduleTimerCommand) Execute(clock clock.Clock) *CommandResult
func (*ScheduleTimerCommand) HandleCancel ¶
func (c *ScheduleTimerCommand) HandleCancel()
type SideEffectCommand ¶
type SideEffectCommand struct {
// contains filtered or unexported fields
}
func NewSideEffectCommand ¶
func NewSideEffectCommand(id int64) *SideEffectCommand
func (*SideEffectCommand) Commit ¶
func (c *SideEffectCommand) Commit()
func (*SideEffectCommand) Done ¶
func (c *SideEffectCommand) Done()
func (*SideEffectCommand) Execute ¶
func (c *SideEffectCommand) Execute(clock clock.Clock) *CommandResult
func (*SideEffectCommand) SetResult ¶
func (c *SideEffectCommand) SetResult(result payload.Payload)
func (*SideEffectCommand) State ¶
func (c *SideEffectCommand) State() CommandState
type SignalWorkflowCommand ¶
type SignalWorkflowCommand struct {
Instance *core.WorkflowInstance
Name string
Arg payload.Payload
// contains filtered or unexported fields
}
func NewSignalWorkflowCommand ¶
func NewSignalWorkflowCommand( id int64, workflowInstanceID, name string, arg payload.Payload, ) *SignalWorkflowCommand
func (*SignalWorkflowCommand) Done ¶
func (c *SignalWorkflowCommand) Done()
func (*SignalWorkflowCommand) Execute ¶
func (c *SignalWorkflowCommand) Execute(clock clock.Clock) *CommandResult
func (*SignalWorkflowCommand) State ¶
func (c *SignalWorkflowCommand) State() CommandState
Click to show internal directories.
Click to hide internal directories.