Skip to content
Node: bullgithub.com/sahilkhaire/gox/queue

Handler

Overview

Handler processes a task payload.

Part of the queue package — Node.js analog: bull.

Handler is a type exported by gox. Methods on this type are documented separately.

Signature

go
type Handler func(ctx context.Context, payload []byte) error

Compare: Node.js · Standard Go · gox

js
// Typical bull pattern in Node.js
go
// hibiken/asynq client + worker
go
import "github.com/sahilkhaire/gox/queue"

var _ queue.Handler = func(ctx context.Context, payload []byte) error { return nil }

Example

go
import "github.com/sahilkhaire/gox/queue"

var _ queue.Handler = func(ctx context.Context, payload []byte) error { return nil }

Tips

Browse methods on this type in the sidebar for handler-style APIs and options structs.

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.

Back to queue package overview

MIT Licensed · Built for Node.js developers moving to Go