Documentation
¶
Overview ¶
Package main demonstrates transactional completion — committing a business database write and the dureq completion marker in the same SQL transaction.
This is the strongest exactly-once pattern when your business state and job result live in the same PostgreSQL database.
Requires: PostgreSQL running with the dureq_completions table created. See pkg/integration/postgres.EnsureTable().
Usage:
export POSTGRES_DSN="postgres://user:pass@localhost/mydb?sslmode=disable" go run ./examples/pg_completion
Click to show internal directories.
Click to hide internal directories.