Documentation
¶
Overview ¶
Package main demonstrates dureq workflows using the mux handler pattern — pattern-based routing, global middleware, per-handler middleware, and context utilities for metadata access.
Compared to the plain workflow example, this version:
- Registers a single "order.*" pattern handler that dispatches by task type
- Adds global logging middleware via srv.Use()
- Adds per-handler timing middleware
- Uses context utilities (GetJobID, GetTaskType, GetAttempt, etc.)
Scenario: Same order processing DAG as the plain workflow example.
validate_order ──┬── charge_payment
└── reserve_inventory
│
charge_payment ──────┐ │
▼ ▼
ship_order
│
▼
send_confirmation
Click to show internal directories.
Click to hide internal directories.