workflow_with_mux

command
v0.1.11 Latest Latest
Warning

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

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

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

Jump to

Keyboard shortcuts

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