httpserver

command
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

HTTP server mode: standalone delay queue service

Usage:

go run . &

# Add a task (fires after 5 seconds)
curl -X POST http://localhost:9280/add \
  -d '{"topic":"notify","id":"msg-1","body":"hello","delay_ms":5000,"ttr_ms":30000}'

# Pop a ready task (long-poll, waits up to 10 seconds)
curl -X POST http://localhost:9280/pop \
  -d '{"topic":"notify","timeout_ms":10000}'

# Finish the task
curl -X POST http://localhost:9280/finish \
  -d '{"topic":"notify","id":"msg-1"}'

# Check stats
curl http://localhost:9280/stats

Jump to

Keyboard shortcuts

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