queue
Package queue provides a Redis-backed task queue similar to Bull/BullMQ, backed by github.com/hibiken/asynq. Node equivalent: bull, bullmq
import "github.com/sahilkhaire/gox/queue"
Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.
Types
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Client | — | type | Client enqueues background tasks. |
| EnqueueOpts | — | type | EnqueueOpts configures task enqueue behavior. |
| Handler | — | type | Handler processes a task payload. |
| ServeMux | — | type | ServeMux routes tasks by type name. |
| Worker | — | type | Worker processes tasks from Redis. |
Methods
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Client.New | — | method | New creates a queue client connected to redisAddr (host:port). |
| ServeMux.NewServeMux | — | method | NewServeMux returns an empty task router. |
| Worker.NewWorker | — | method | NewWorker creates a worker that dispatches to mux. |