Documentation
¶
Overview ¶
Package samples provides development-only backend wiring for the feature demos. Use -backend memory for isolated single-process examples, or -backend sqlite for processes sharing a local file. The default Redis recreation path flushes ALL databases on localhost:6379. Never use it with shared or production storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBackend ¶
GetBackend parses demo CLI flags and opens storage using fixed local settings. It is not application configuration. In Redis mode it also starts diagnostics on loopback port 3000; demos with their own diagnostics should use another backend.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Run from make shell with: go run ./samples/activity-registration -backend memory.
|
Run from make shell with: go run ./samples/activity-registration -backend memory. |
|
Run from make shell with: go run ./samples/cancellation -backend memory.
|
Run from make shell with: go run ./samples/cancellation -backend memory. |
|
Run from make shell with: go run ./samples/complex-parameters -backend memory.
|
Run from make shell with: go run ./samples/complex-parameters -backend memory. |
|
Run from make shell with: go run ./samples/concurrent -backend memory.
|
Run from make shell with: go run ./samples/concurrent -backend memory. |
|
Run from make shell with: go run ./samples/concurrent-errgroup -backend memory.
|
Run from make shell with: go run ./samples/concurrent-errgroup -backend memory. |
|
Run from make shell with: go run ./samples/context-propagation -backend memory.
|
Run from make shell with: go run ./samples/context-propagation -backend memory. |
|
Run from make shell with: go run ./samples/continue-as-new -backend memory.
|
Run from make shell with: go run ./samples/continue-as-new -backend memory. |
|
Run from make shell with: go run ./samples/converter -backend memory.
|
Run from make shell with: go run ./samples/converter -backend memory. |
|
Run from make shell with: go run ./samples/errors -backend memory.
|
Run from make shell with: go run ./samples/errors -backend memory. |
|
This example shows the smallest client/worker connection without activities.
|
This example shows the smallest client/worker connection without activities. |
|
Run from make shell with: go run ./samples/orchestrator -backend memory.
|
Run from make shell with: go run ./samples/orchestrator -backend memory. |
|
Run from make shell with: go run ./samples/queues -backend memory.
|
Run from make shell with: go run ./samples/queues -backend memory. |
|
This example runs a client and worker in one process against a SQLite file.
|
This example runs a client and worker in one process against a SQLite file. |
|
Run from make shell with: go run ./samples/retries -backend memory.
|
Run from make shell with: go run ./samples/retries -backend memory. |
|
Each instance runs two activities sequentially.
|
Each instance runs two activities sequentially. |
|
starter
command
Producer for the scaling demonstration.
|
Producer for the scaling demonstration. |
|
worker
command
Consumer for the scaling demonstration.
|
Consumer for the scaling demonstration. |
|
Run from make shell with: go run ./samples/signal -backend memory.
|
Run from make shell with: go run ./samples/signal -backend memory. |
|
Run from make shell with: go run ./samples/signal-subworkflow -backend memory.
|
Run from make shell with: go run ./samples/signal-subworkflow -backend memory. |
|
Run from make shell with: go run ./samples/simple -backend memory.
|
Run from make shell with: go run ./samples/simple -backend memory. |
|
Package simple_split_worker contains definitions shared by the producer and consumer binaries.
|
Package simple_split_worker contains definitions shared by the producer and consumer binaries. |
|
starter
command
Producer process.
|
Producer process. |
|
worker
command
Consumer process.
|
Consumer process. |
|
Run from make shell with: go run ./samples/subworkflow -backend memory.
|
Run from make shell with: go run ./samples/subworkflow -backend memory. |
|
Run from make shell with: go run ./samples/timer -backend memory.
|
Run from make shell with: go run ./samples/timer -backend memory. |
|
Run from make shell with: go run ./samples/tracing -backend memory.
|
Run from make shell with: go run ./samples/tracing -backend memory. |
|
Run from make shell with: go run ./samples/web -backend memory.
|
Run from make shell with: go run ./samples/web -backend memory. |
|
Run from make shell with: go run ./samples/workflow-info.
|
Run from make shell with: go run ./samples/workflow-info. |
|
Run from make shell with: go run ./samples/workflow-registration -backend memory.
|
Run from make shell with: go run ./samples/workflow-registration -backend memory. |
Click to show internal directories.
Click to hide internal directories.