Client.New
Overview
New creates a queue client connected to redisAddr (host:port).
Part of the queue package — Node.js analog: bull.
Method on Client — call it on a value of that type after constructing or receiving one from a constructor.
Signature
go
func New(redisAddr string) *ClientCompare: Node.js · Standard Go · gox
js
const queue = new Queue('tasks');go
// hibiken/asynq client + workergo
import "github.com/sahilkhaire/gox/queue"
client, err := queue.New("localhost:6379")Example
go
import "github.com/sahilkhaire/gox/queue"
client, err := queue.New("localhost:6379")Tips
Obtain a Client value first (see constructors on the package overview), then call New.
Standard library alternative
gox wraps the Go standard library or a trusted dependency with Node-familiar naming. You can use the underlying library directly — see the package overview for escape hatches.