Documentation
¶
Index ¶
- func NewCancelTimerCommand(id int64, timerScheduleEventID int64) *cancelTimerCommand
- func NewSideEffectCommand(id int64, result payload.Payload) *sideEffectCommand
- type CancelSubWorkflowCommand
- type Command
- type CommandResult
- type CommandState
- type CompleteWorkflowCommand
- type ScheduleActivityCommand
- type ScheduleSubWorkflowCommand
- type ScheduleTimerCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCancelTimerCommand ¶
func NewSideEffectCommand ¶
Types ¶
type CancelSubWorkflowCommand ¶ added in v0.4.0
type CancelSubWorkflowCommand struct {
SubWorkflowInstance *core.WorkflowInstance
// contains filtered or unexported fields
}
func NewCancelSubWorkflowCommand ¶ added in v0.1.0
func NewCancelSubWorkflowCommand(id int64, subWorkflowInstance *core.WorkflowInstance) *CancelSubWorkflowCommand
func (*CancelSubWorkflowCommand) Commit ¶ added in v0.4.0
func (c *CancelSubWorkflowCommand) Commit(clock clock.Clock) *CommandResult
func (*CancelSubWorkflowCommand) State ¶ added in v0.4.0
func (c *CancelSubWorkflowCommand) State() CommandState
func (*CancelSubWorkflowCommand) Type ¶ added in v0.4.0
func (*CancelSubWorkflowCommand) Type() string
type Command ¶
type Command interface {
ID() int64
Commit(clock clock.Clock) *CommandResult
// Done marks the command as done. This transitions the state to done and indicates that the result
// of this command has been applied.
Done()
State() CommandState
Type() string
}
type CommandResult ¶ added in v0.4.0
type CommandState ¶
type CommandState int
const ( CommandState_Pending CommandState = iota CommandState_Committed CommandState_Done )
┌───────┐
│Pending├
└───────┘
▼
┌─────────┐ │Committed│ └─────────┘
▼ ┌────┐ │Done│ └────┘
type CompleteWorkflowCommand ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (c *CompleteWorkflowCommand) Commit(clock clock.Clock) *CommandResult
func (*CompleteWorkflowCommand) State ¶ added in v0.4.0
func (c *CompleteWorkflowCommand) State() CommandState
func (*CompleteWorkflowCommand) Type ¶ added in v0.4.0
func (*CompleteWorkflowCommand) Type() string
type ScheduleActivityCommand ¶ added in v0.4.0
type ScheduleActivityCommand struct {
Name string
Inputs []payload.Payload
// contains filtered or unexported fields
}
func (*ScheduleActivityCommand) Commit ¶ added in v0.4.0
func (c *ScheduleActivityCommand) Commit(clock clock.Clock) *CommandResult
func (*ScheduleActivityCommand) State ¶ added in v0.4.0
func (c *ScheduleActivityCommand) State() CommandState
func (*ScheduleActivityCommand) Type ¶ added in v0.4.0
func (*ScheduleActivityCommand) Type() string
type ScheduleSubWorkflowCommand ¶ added in v0.4.0
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) Commit ¶ added in v0.4.0
func (c *ScheduleSubWorkflowCommand) Commit(clock clock.Clock) *CommandResult
func (*ScheduleSubWorkflowCommand) Done ¶ added in v0.4.0
func (c *ScheduleSubWorkflowCommand) Done()
func (*ScheduleSubWorkflowCommand) ID ¶ added in v0.4.0
func (c *ScheduleSubWorkflowCommand) ID() int64
func (*ScheduleSubWorkflowCommand) State ¶ added in v0.4.0
func (c *ScheduleSubWorkflowCommand) State() CommandState
func (*ScheduleSubWorkflowCommand) Type ¶ added in v0.4.0
func (*ScheduleSubWorkflowCommand) Type() string
type ScheduleTimerCommand ¶ added in v0.4.0
type ScheduleTimerCommand struct {
// contains filtered or unexported fields
}
func NewScheduleTimerCommand ¶
func NewScheduleTimerCommand(id int64, at time.Time) *ScheduleTimerCommand
func (*ScheduleTimerCommand) Commit ¶ added in v0.4.0
func (c *ScheduleTimerCommand) Commit(clock clock.Clock) *CommandResult
func (*ScheduleTimerCommand) State ¶ added in v0.4.0
func (c *ScheduleTimerCommand) State() CommandState
func (*ScheduleTimerCommand) Type ¶ added in v0.4.0
func (c *ScheduleTimerCommand) Type() string
Click to show internal directories.
Click to hide internal directories.