workflow

package
v0.0.0-...-56d0f0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryType  = "GetWakeUpTime"
	SignalType = "UpdateWakeUpTime"
)
View Source
const GreetingTaskQueue = "GREETING_TASK_QUEUE"

Variables

This section is empty.

Functions

func ComposeGreeting

func ComposeGreeting(ctx context.Context, name string) (string, error)

func GreetingWorkflow

func GreetingWorkflow(ctx workflow.Context, initialWakeUpTime time.Time) (string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL