pgq

package
v0.7.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

Queue implements a JobQueue backed by PostgreSQL. Refer Open() for initialising.

func Open

func Open(conString, queueName string) (*Queue, error)

Open returns a JobQueue implementation backed by the PostgreSQL instance discovered by the conString. The table used for the queue will be based on the queueName. Necessary migrations will be done automatically.

func (*Queue) Close

func (q *Queue) Close() error

func (*Queue) Dequeue

func (q *Queue) Dequeue(ctx context.Context, kinds []string, fn worker.DequeueFn) error

func (*Queue) Enqueue

func (q *Queue) Enqueue(ctx context.Context, jobs ...worker.Job) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL