Versions in this module Expand all Collapse all v1 v1.0.1 Feb 8, 2018 v1.0.0 Sep 6, 2017 v0 v0.5.0 Aug 17, 2016 Changes in this version + var ErrAgain = errors.New("maximum number of LockJob attempts reached") + var ErrMissingType = errors.New("job type must be specified") + func PrepareStatements(conn *pgx.Conn) error + type Client struct + func NewClient(pool *pgx.ConnPool) *Client + func (c *Client) Enqueue(j *Job) error + func (c *Client) EnqueueInTx(j *Job, tx *pgx.Tx) error + func (c *Client) LockJob(queue string) (*Job, error) + type Job struct + Args []byte + ErrorCount int32 + ID int64 + LastError pgx.NullString + Priority int16 + Queue string + RunAt time.Time + Type string + func (j *Job) Conn() *pgx.Conn + func (j *Job) Delete() error + func (j *Job) Done() + func (j *Job) Error(msg string) error + type WorkFunc func(j *Job) error + type WorkMap map[string]WorkFunc + type Worker struct + Interval time.Duration + Queue string + func NewWorker(c *Client, m WorkMap) *Worker + func (w *Worker) Shutdown() + func (w *Worker) Work() + func (w *Worker) WorkOne() (didWork bool) + type WorkerPool struct + Interval time.Duration + Queue string + WorkMap WorkMap + func NewWorkerPool(c *Client, wm WorkMap, count int) *WorkerPool + func (w *WorkerPool) Shutdown() + func (w *WorkerPool) Start()