worker

command
v0.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

README

Typed worker example

This example runs the v0.3 worker package against SQLite. It publishes one JSON order, decodes it into a Go struct, and uses Job.CompleteTx to insert the business effect and ACK the delivery in one transaction.

From the repository root:

go run ./example/worker

Press Ctrl-C after the job is processed. The worker stops claiming, drains its active handlers, and only then shuts down the queue. The example intentionally uses worker-example.db; subsequent runs safely reuse its topic and idempotent business table.

Documentation

Overview

Package main demonstrates the typed BlockQueue worker runtime.

Jump to

Keyboard shortcuts

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