Documentation
¶
Index ¶
- type Option
- func WithAddr(addrs ...string) Option
- func WithConnectTimeout(timeout time.Duration) Option
- func WithLogger(l queue.Logger) Option
- func WithQueue(queue string) Option
- func WithRequestTimeout(timeout time.Duration) Option
- func WithRunFunc(fn func(context.Context, core.TaskMessage) error) Option
- func WithSubj(subj string) Option
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*options)
Option for queue system
func WithConnectTimeout ¶
WithConnectTimeout bounds the initial NATS connection attempt.
func WithRequestTimeout ¶
WithRequestTimeout sets how long Request waits for a NATS message.
func WithRunFunc ¶
WithRunFunc setup the run func of queue
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker for NSQ
func NewWorkerE ¶
NewWorkerE creates a worker and returns connection and subscription errors.
func (*Worker) BackendName ¶
BackendName identifies Core NATS in lifecycle events.
func (*Worker) Queue ¶
func (w *Worker) Queue(job core.TaskMessage) error
Queue send notification to queue
Click to show internal directories.
Click to hide internal directories.