updatabletimer

command
v1.14.5 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 9 Imported by: 0

README

helloworld

inspired by temporalio/samples-go/updatabletimer

Getting Started

  1. Run a temporal service
    temporal server start-dev
    
  2. In a different shell, run the example worker
    go run examples/updatabletimer/main.go worker
    
  3. In a different shell, execute the workflow
    # initialize background timer for 1h in the future
    go run examples/updatabletimer/main.go updatable-timer \
        --name example \
        --initial-wake-up-time $(TZ=UTC date -v+1H "+%Y-%m-%dT%H:%M:%SZ") \
        -d
    
    # query timer
    go run examples/updatabletimer/main.go get-wake-up-time -w updatable-timer/example
    
    # update timer for 30s in the future
    go run examples/updatabletimer/main.go update-wake-up-time \
        -w updatable-timer/example \
        --wake-up-time $(TZ=UTC date -v+30S "+%Y-%m-%dT%H:%M:%SZ")
    

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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