Help us shape the future of Go! Take the 2026 Go Developer Survey

kitchen-sink

command
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package main demonstrates a comprehensive Dispatch setup with jobs, workflows, cron scheduling, saga compensations, child workflows, and a DWP WebSocket server. Run it and connect via WebSocket, HTTP RPC, or the Go/TS/Python client.

Usage:

go run .

Then in another terminal:

# Enqueue a job via HTTP RPC
curl -X POST http://localhost:8080/dwp/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "id": "req-1",
    "type": "request",
    "method": "job.enqueue",
    "token": "demo-token",
    "data": {"name":"send-email","payload":{"to":"user@example.com","subject":"Hello"}}
  }'

# Start a workflow via HTTP RPC
curl -X POST http://localhost:8080/dwp/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "id": "req-2",
    "type": "request",
    "method": "workflow.start",
    "token": "demo-token",
    "data": {"name":"order-pipeline","input":{"order_id":"ORD-001","items":["widget","gadget"]}}
  }'

# Get stats
curl -X POST http://localhost:8080/dwp/rpc \
  -H "Content-Type: application/json" \
  -d '{"id":"req-3","type":"request","method":"stats","token":"demo-token"}'

Jump to

Keyboard shortcuts

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