Documentation
¶
Index ¶
- func FixTimerCommandFromActivityOutput(now time.Time, request iwfidl.CommandRequest) iwfidl.CommandRequest
- type GreedyTimerProcessor
- func (t *GreedyTimerProcessor) AddTimers(stateExeId string, commands []iwfidl.TimerCommand, ...)
- func (t *GreedyTimerProcessor) Dump() []service.StaleSkipTimerSignal
- func (t *GreedyTimerProcessor) GetTimerInfos() map[string][]*service.TimerInfo
- func (t *GreedyTimerProcessor) GetTimerStartedUnixTimestamps() []int64
- func (t *GreedyTimerProcessor) RemovePendingTimersOfState(stateExeId string)
- func (t *GreedyTimerProcessor) RetryStaleSkipTimer() bool
- func (t *GreedyTimerProcessor) SkipTimer(stateExeId, timerId string, timerIdx int) bool
- func (t *GreedyTimerProcessor) WaitForTimerFiredOrSkipped(ctx interfaces.UnifiedContext, stateExeId string, timerIdx int, ...) service.InternalTimerStatus
- type SimpleTimerProcessor
- func (t *SimpleTimerProcessor) AddTimers(stateExeId string, commands []iwfidl.TimerCommand, ...)
- func (t *SimpleTimerProcessor) Dump() []service.StaleSkipTimerSignal
- func (t *SimpleTimerProcessor) GetTimerInfos() map[string][]*service.TimerInfo
- func (t *SimpleTimerProcessor) GetTimerStartedUnixTimestamps() []int64
- func (t *SimpleTimerProcessor) RemovePendingTimersOfState(stateExeId string)
- func (t *SimpleTimerProcessor) RetryStaleSkipTimer() bool
- func (t *SimpleTimerProcessor) SkipTimer(stateExeId, timerId string, timerIdx int) bool
- func (t *SimpleTimerProcessor) WaitForTimerFiredOrSkipped(ctx interfaces.UnifiedContext, stateExeId string, timerIdx int, ...) service.InternalTimerStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FixTimerCommandFromActivityOutput ¶
func FixTimerCommandFromActivityOutput(now time.Time, request iwfidl.CommandRequest) iwfidl.CommandRequest
FixTimerCommandFromActivityOutput converts the durationSeconds to firingUnixTimestampSeconds doing it right after the activity output so that we don't need to worry about the time drift after continueAsNew
Types ¶
type GreedyTimerProcessor ¶
type GreedyTimerProcessor struct {
// contains filtered or unexported fields
}
func NewGreedyTimerProcessor ¶
func NewGreedyTimerProcessor( ctx interfaces.UnifiedContext, provider interfaces.WorkflowProvider, continueAsNewCounter *cont.ContinueAsNewCounter, staleSkipTimerSignals []service.StaleSkipTimerSignal, ) *GreedyTimerProcessor
func (*GreedyTimerProcessor) AddTimers ¶
func (t *GreedyTimerProcessor) AddTimers( stateExeId string, commands []iwfidl.TimerCommand, completedTimerCmds map[int]service.InternalTimerStatus, )
func (*GreedyTimerProcessor) Dump ¶
func (t *GreedyTimerProcessor) Dump() []service.StaleSkipTimerSignal
func (*GreedyTimerProcessor) GetTimerInfos ¶
func (t *GreedyTimerProcessor) GetTimerInfos() map[string][]*service.TimerInfo
func (*GreedyTimerProcessor) GetTimerStartedUnixTimestamps ¶
func (t *GreedyTimerProcessor) GetTimerStartedUnixTimestamps() []int64
func (*GreedyTimerProcessor) RemovePendingTimersOfState ¶
func (t *GreedyTimerProcessor) RemovePendingTimersOfState(stateExeId string)
RemovePendingTimersOfState is for when a state is completed, remove all its pending pendingScheduling
func (*GreedyTimerProcessor) RetryStaleSkipTimer ¶
func (t *GreedyTimerProcessor) RetryStaleSkipTimer() bool
func (*GreedyTimerProcessor) SkipTimer ¶
func (t *GreedyTimerProcessor) SkipTimer(stateExeId, timerId string, timerIdx int) bool
SkipTimer will attempt to skip a timer, return false if no valid timer found
func (*GreedyTimerProcessor) WaitForTimerFiredOrSkipped ¶
func (t *GreedyTimerProcessor) WaitForTimerFiredOrSkipped( ctx interfaces.UnifiedContext, stateExeId string, timerIdx int, cancelWaiting *bool, ) service.InternalTimerStatus
WaitForTimerFiredOrSkipped waits for timer completed(fired or skipped), return true when the timer is fired or skipped return false if the waitingCommands is canceled by cancelWaiting bool pointer(when the trigger type is completed, or continueAsNew)
type SimpleTimerProcessor ¶
type SimpleTimerProcessor struct {
// contains filtered or unexported fields
}
func NewSimpleTimerProcessor ¶
func NewSimpleTimerProcessor( ctx interfaces.UnifiedContext, provider interfaces.WorkflowProvider, staleSkipTimerSignals []service.StaleSkipTimerSignal, ) *SimpleTimerProcessor
func (*SimpleTimerProcessor) AddTimers ¶
func (t *SimpleTimerProcessor) AddTimers( stateExeId string, commands []iwfidl.TimerCommand, completedTimerCmds map[int]service.InternalTimerStatus, )
func (*SimpleTimerProcessor) Dump ¶
func (t *SimpleTimerProcessor) Dump() []service.StaleSkipTimerSignal
func (*SimpleTimerProcessor) GetTimerInfos ¶
func (t *SimpleTimerProcessor) GetTimerInfos() map[string][]*service.TimerInfo
func (*SimpleTimerProcessor) GetTimerStartedUnixTimestamps ¶
func (t *SimpleTimerProcessor) GetTimerStartedUnixTimestamps() []int64
func (*SimpleTimerProcessor) RemovePendingTimersOfState ¶
func (t *SimpleTimerProcessor) RemovePendingTimersOfState(stateExeId string)
RemovePendingTimersOfState is for when a state is completed, remove all its pending timers
func (*SimpleTimerProcessor) RetryStaleSkipTimer ¶
func (t *SimpleTimerProcessor) RetryStaleSkipTimer() bool
func (*SimpleTimerProcessor) SkipTimer ¶
func (t *SimpleTimerProcessor) SkipTimer(stateExeId, timerId string, timerIdx int) bool
SkipTimer will attempt to skip a timer, return false if no valid timer found
func (*SimpleTimerProcessor) WaitForTimerFiredOrSkipped ¶
func (t *SimpleTimerProcessor) WaitForTimerFiredOrSkipped( ctx interfaces.UnifiedContext, stateExeId string, timerIdx int, cancelWaiting *bool, ) service.InternalTimerStatus
WaitForTimerFiredOrSkipped waits for timer completed(fired or skipped), return true when the timer is fired or skipped return false if the waitingCommands is canceled by cancelWaiting bool pointer(when the trigger type is completed, or continueAsNew)