Documentation ¶
Index ¶
- type CancelSubWorkflowCommand
- func (c *CancelSubWorkflowCommand) Commit(clock clock.Clock) *CommandResult
- func (c *CancelSubWorkflowCommand) Committed() bool
- func (c *CancelSubWorkflowCommand) Done()
- func (c *CancelSubWorkflowCommand) ID() int64
- func (c *CancelSubWorkflowCommand) State() CommandState
- func (*CancelSubWorkflowCommand) Type() string
- type CancelTimerCommand
- type Command
- type CommandResult
- type CommandState
- type CompleteWorkflowCommand
- func (c *CompleteWorkflowCommand) Commit(clock clock.Clock) *CommandResult
- func (c *CompleteWorkflowCommand) Committed() bool
- func (c *CompleteWorkflowCommand) Done()
- func (c *CompleteWorkflowCommand) ID() int64
- func (c *CompleteWorkflowCommand) State() CommandState
- func (*CompleteWorkflowCommand) Type() string
- type ScheduleActivityCommand
- func (c *ScheduleActivityCommand) Commit(clock clock.Clock) *CommandResult
- func (c *ScheduleActivityCommand) Committed() bool
- func (c *ScheduleActivityCommand) Done()
- func (c *ScheduleActivityCommand) ID() int64
- func (c *ScheduleActivityCommand) State() CommandState
- func (*ScheduleActivityCommand) Type() string
- type ScheduleSubWorkflowCommand
- func (c *ScheduleSubWorkflowCommand) Commit(clock clock.Clock) *CommandResult
- func (c *ScheduleSubWorkflowCommand) Committed() bool
- func (c *ScheduleSubWorkflowCommand) Done()
- func (c *ScheduleSubWorkflowCommand) ID() int64
- func (c *ScheduleSubWorkflowCommand) State() CommandState
- func (*ScheduleSubWorkflowCommand) Type() string
- type ScheduleTimerCommand
- type SideEffectCommand
- func (c *SideEffectCommand) Commit(clock clock.Clock) *CommandResult
- func (c *SideEffectCommand) Committed() bool
- func (c *SideEffectCommand) Done()
- func (c *SideEffectCommand) ID() int64
- func (c *SideEffectCommand) SetResult(result payload.Payload)
- func (c *SideEffectCommand) State() CommandState
- func (c *SideEffectCommand) Type() string
- type SignalWorkflowCommand
- func (c *SignalWorkflowCommand) Commit(clock clock.Clock) *CommandResult
- func (c *SignalWorkflowCommand) Committed() bool
- func (c *SignalWorkflowCommand) Done()
- func (c *SignalWorkflowCommand) ID() int64
- func (c *SignalWorkflowCommand) State() CommandState
- func (*SignalWorkflowCommand) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) Committed ¶ added in v0.4.1
func (c *CancelSubWorkflowCommand) Committed() bool
func (*CancelSubWorkflowCommand) Done ¶ added in v0.4.0
func (c *CancelSubWorkflowCommand) Done()
Done marks the command as done
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 CancelTimerCommand ¶ added in v0.4.1
type CancelTimerCommand struct { TimerScheduleEventID int64 // contains filtered or unexported fields }
func NewCancelTimerCommand ¶
func NewCancelTimerCommand(id int64, timerScheduleEventID int64) *CancelTimerCommand
func (*CancelTimerCommand) Commit ¶ added in v0.4.1
func (c *CancelTimerCommand) Commit(clock clock.Clock) *CommandResult
func (*CancelTimerCommand) Committed ¶ added in v0.4.1
func (c *CancelTimerCommand) Committed() bool
func (*CancelTimerCommand) Done ¶ added in v0.4.1
func (c *CancelTimerCommand) Done()
Done marks the command as done
func (*CancelTimerCommand) State ¶ added in v0.4.1
func (c *CancelTimerCommand) State() CommandState
func (*CancelTimerCommand) Type ¶ added in v0.4.1
func (*CancelTimerCommand) Type() string
type Command ¶
type Command interface { ID() int64 Type() string State() CommandState Committed() bool 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() }
type CommandResult ¶ added in v0.4.0
type CommandState ¶
type CommandState int
const ( CommandState_Pending CommandState = iota CommandState_Committed CommandState_Done )
┌───────┐
┌──────┤Pending│ - Command is pending, has just been added │ └───────┘ │ ▼ │ ┌─────────┐ │ │Committed│ - Command has been committed. Its results (e.g., events) have been checkpointed │ └─────────┘ │ ▼ │ ┌────┐ └──────►│Done│ - Command has been marked as 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) Committed ¶ added in v0.4.1
func (c *CompleteWorkflowCommand) Committed() bool
func (*CompleteWorkflowCommand) Done ¶ added in v0.4.0
func (c *CompleteWorkflowCommand) Done()
Done marks the command as done
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) Committed ¶ added in v0.4.1
func (c *ScheduleActivityCommand) Committed() bool
func (*ScheduleActivityCommand) Done ¶ added in v0.4.0
func (c *ScheduleActivityCommand) Done()
Done marks the command as done
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) Committed ¶ added in v0.4.1
func (c *ScheduleSubWorkflowCommand) Committed() bool
func (*ScheduleSubWorkflowCommand) Done ¶ added in v0.4.0
func (c *ScheduleSubWorkflowCommand) Done()
Done marks the command as 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) Committed ¶ added in v0.4.1
func (c *ScheduleTimerCommand) Committed() bool
func (*ScheduleTimerCommand) Done ¶ added in v0.4.0
func (c *ScheduleTimerCommand) Done()
Done marks the command as done
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
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(clock clock.Clock) *CommandResult
func (*SideEffectCommand) Done ¶ added in v0.4.1
func (c *SideEffectCommand) Done()
Done marks the command as done
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
func (*SideEffectCommand) Type ¶ added in v0.4.1
func (c *SideEffectCommand) Type() string
type SignalWorkflowCommand ¶ added in v0.5.0
type SignalWorkflowCommand struct { Instance *core.WorkflowInstance Name string Arg payload.Payload // contains filtered or unexported fields }
func NewSignalWorkflowCommand ¶ added in v0.5.0
func NewSignalWorkflowCommand( id int64, workflowInstanceID, name string, arg payload.Payload, ) *SignalWorkflowCommand
func (*SignalWorkflowCommand) Commit ¶ added in v0.5.0
func (c *SignalWorkflowCommand) Commit(clock clock.Clock) *CommandResult
func (*SignalWorkflowCommand) Committed ¶ added in v0.5.0
func (c *SignalWorkflowCommand) Committed() bool
func (*SignalWorkflowCommand) Done ¶ added in v0.5.0
func (c *SignalWorkflowCommand) Done()
Done marks the command as done
func (*SignalWorkflowCommand) State ¶ added in v0.5.0
func (c *SignalWorkflowCommand) State() CommandState
func (*SignalWorkflowCommand) Type ¶ added in v0.5.0
func (*SignalWorkflowCommand) Type() string
Click to show internal directories.
Click to hide internal directories.