batch_with_mux

command
v0.1.4 Latest Latest
Warning

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

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

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.

  1. onetime: download a shared background template image
  2. per-item: overlay each user's text onto the template and produce a result URL

Jump to

Keyboard shortcuts

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