Documentation ¶
Index ¶
Constants ¶
View Source
const ( TaskQueue = "updatable-timer" WorkflowID = "updatable-timer" QueryType = "GetWakeUpTime" SignalType = "UpdateWakeUpTime" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UpdatableTimer ¶
type UpdatableTimer struct {
// contains filtered or unexported fields
}
UpdatableTimer is an example of a timer that can have its wake time updated
func (*UpdatableTimer) GetWakeUpTime ¶
func (u *UpdatableTimer) GetWakeUpTime() time.Time
func (*UpdatableTimer) SleepUntil ¶
func (u *UpdatableTimer) SleepUntil(ctx workflow.Context, wakeUpTime time.Time, updateWakeUpTimeCh workflow.ReceiveChannel) (err error)
SleepUntil sleeps until the provided wake-up time. The wake-up time can be updated at any time by sending a new time over updateWakeUpTimeCh. Supports ctx cancellation. Returns temporal.CanceledError if ctx was canceled.
Click to show internal directories.
Click to hide internal directories.