golazy.dev
–
golazy.dev
/
pg
/
pgjobs
Index
|
Files
package pgjobs ¶
import "golazy.dev/pg/pgjobs"
Functions ¶
func Migrations ¶
Migrations returns the PostgreSQL migrations required by the lazyjobs backend.
func Migrations() lazymigrate.Source
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func New ¶
func New(pool *pgxpool.Pool) *Backend
func (backend *Backend) Claim ¶
func (backend *Backend) Claim(ctx context.Context, params lazyjobs.ClaimParams) (lazyjobs.Record, bool, error)
func (backend *Backend) Complete ¶
func (backend *Backend) Complete(ctx context.Context, id int64) error
func (backend *Backend) Discard ¶
func (backend *Backend) Discard(ctx context.Context, params lazyjobs.DiscardParams) error
func (backend *Backend) Insert ¶
func (backend *Backend) Insert(ctx context.Context, params lazyjobs.InsertParams) (lazyjobs.Record, error)
func (backend *Backend) List ¶
func (backend *Backend) List(ctx context.Context, options lazyjobs.ListOptions) ([]lazyjobs.Record, error)
func (backend *Backend) Retry ¶
func (backend *Backend) Retry(ctx context.Context, params lazyjobs.RetryParams) error
func (backend *Backend) Stats ¶
func (backend *Backend) Stats(ctx context.Context) (lazyjobs.Stats, error)
Package pgjobs implements a PostgreSQL backend for golazy.dev/lazyjobs.