Versions in this module Expand all Collapse all v1 v1.1.1 Oct 30, 2021 v1.1.0 Oct 25, 2021 Changes in this version + var ErrNilConsumer = errors.New("nil queue consumer") + var ErrNilProducer = errors.New("nil queue producer") + var ErrQueueNotExist = errors.New("queue does not exist") + type InitFunc func(Job) + type InitRegistry struct + func NewInitRegistry() *InitRegistry + func (r *InitRegistry) Get(name string) (InitFunc, bool) + func (r *InitRegistry) Register(name string, fn InitFunc) + type Job interface + Name func() string + Perform func() error + type Memory struct + func NewMemory(n int, errh func(Job, error)) *Memory + func (m *Memory) Consume(ctx context.Context) error + func (m *Memory) InitFunc(name string, fn InitFunc) + func (m *Memory) Produce(ctx context.Context, j Job) (string, error) + type Queue interface + Consume func(context.Context) error + InitFunc func(string, InitFunc) + Produce func(context.Context, Job) (string, error) + type Redis struct + func NewRedisConsumer(log *log.Logger, opts *curlyq.ConsumerOpts) *Redis + func NewRedisProducer(log *log.Logger, opts *curlyq.ProducerOpts) *Redis + func (c *Redis) InitFunc(name string, fn InitFunc) + func (r *Redis) Consume(ctx context.Context) error + func (r *Redis) Produce(ctx context.Context, j Job) (string, error) + type Set struct + func NewSet() *Set + func (s *Set) Add(name string, q Queue) + func (s *Set) InitFunc(name string, fn InitFunc) + func (s *Set) Produce(ctx context.Context, name string, j Job) (string, error)