examples/

directory
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0

Directories

Path Synopsis
Command basic registers a worker, enqueues a job in a transaction together with a business row, and waits for the job to complete.
Command basic registers a worker, enqueues a job in a transaction together with a business row, and waits for the job to complete.
Command cancel-long-job cancels a running job: its context is cancelled and it ends as cancelled whatever Work returns.
Command cancel-long-job cancels a running job: its context is cancelled and it ends as cancelled whatever Work returns.
Command insert-from-python runs a Go worker for jobs enqueued by a Python script through the SQL contract foreman_insert_job (CONTRACTS C5).
Command insert-from-python runs a Go worker for jobs enqueued by a Python script through the SQL contract foreman_insert_job (CONTRACTS C5).
internal
exampledb
Package exampledb connects the examples to Postgres and gives each its own freshly migrated schema, so examples can run repeatedly and in any order.
Package exampledb connects the examples to Postgres and gives each its own freshly migrated schema, so examples can run repeatedly and in any order.
Command multi-tenant-fairness shows a small tenant served promptly despite a large tenant's backlog, with a per-tenant concurrency limit.
Command multi-tenant-fairness shows a small tenant served promptly despite a large tenant's backlog, with a per-tenant concurrency limit.
Command otel traces job work with OpenTelemetry.
Command otel traces job work with OpenTelemetry.
Command periodic enqueues a job every second through the leader and stops after three ticks.
Command periodic enqueues a job every second through the leader and stops after three ticks.
Command transactional-enqueue shows that a job inserted with InsertTx exists only if its transaction commits.
Command transactional-enqueue shows that a job inserted with InsertTx exists only if its transaction commits.
Command unique inserts the same unique job twice; the second insert returns the first job instead of creating a duplicate.
Command unique inserts the same unique job twice; the second insert returns the first job instead of creating a duplicate.

Jump to

Keyboard shortcuts

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