Documentation
¶
Overview ¶
Package main demonstrates dureq batch processing using the mux handler pattern — pattern-based routing, global middleware, per-handler middleware, and context utilities for metadata access.
Compared to the plain batch example, this version:
- Registers a single "image.*" 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, GetHeaders, etc.)
Scenario: Same image processing pipeline as the plain batch example.
- onetime: download a shared background template image
- per-item: overlay each user's text onto the template and produce a result URL
Click to show internal directories.
Click to hide internal directories.