How abhinavxj/workqueue works
WorkQueue accepts tasks over HTTP, places them in Redis, and runs them asynchronously in a worker that dispatches by task type. The README also documents worker metrics, concurrent execution, and event logging. Producer behavior is visible in its source; worker internals were not sampled, so worker-side relationships below are based on README statements rather than inspected implementation.
Main entry points: worker/main.go Worker service · producer/main.go Producer HTTP API · task.go Task and metrics types · worker.go Concurrent execution
Components 9
Task ingestion
- Producer HTTP API
cmd/producer/main.go - Task and metrics types
internal/task/task.go - Redis queue
Task execution
- Worker service
cmd/worker/main.go - Concurrent execution
internal/worker/worker.go - Task-type dispatch
internal/worker/worker.go
Operations
- Worker metrics
cmd/worker/main.go - Event logging
internal/logger/logger.go
Other components
- Task client
Connections 8
- Task client → Producer HTTP API: POST task
README.md - Producer HTTP API → Task and metrics types: decodes as
cmd/producer/main.go - Producer HTTP API → Redis queue: pushes task
cmd/producer/main.go - Redis queue → Worker service: supplies queued jobs
README.md - Worker service → Concurrent execution: runs concurrently
README.md - Worker service → Task-type dispatch: executes task types
README.md - Worker service → Worker metrics: provides endpoint
README.md - Worker service → Event logging: logs events
README.md