Documentation ¶
Index ¶
- Constants
- Variables
- type PostgreSQLQueue
- func (pgqueue *PostgreSQLQueue) Clear(ctx context.Context) error
- func (pgqueue *PostgreSQLQueue) DeleteJob(ctx context.Context, jobID guid.GUID) error
- func (pgqueue *PostgreSQLQueue) FailJob(ctx context.Context, job queue.Job) error
- func (pgqueue *PostgreSQLQueue) GetFailedJobs(ctx context.Context) (jobs []queue.Job, err error)
- func (pgqueue *PostgreSQLQueue) GetJob(ctx context.Context, jobID guid.GUID) (job queue.Job, err error)
- func (pgqueue *PostgreSQLQueue) Pull(ctx context.Context, numberOfJobs uint64) (ret []queue.Job, err error)
- func (pgqueue *PostgreSQLQueue) Push(ctx context.Context, tx db.Queryer, newJob queue.NewJobInput) (err error)
- func (pgqueue *PostgreSQLQueue) PushMany(ctx context.Context, newJobs []queue.NewJobInput) (err error)
Constants ¶
View Source
const (
MaxPullBatchSize = 200
)
Variables ¶
View Source
var ( ErrJobTypeIsNotValid = errors.New("queue.postgresql: job type is not valid") ErrJobDataIsNotValid = errors.New("queue.postgresql: job data is not valid") ErrJobRetryMaxIsNotValid = errors.New("queue.postgresql: retry_max is not valid") ErrJobRetryDelayIsNotValid = errors.New("queue.postgresql: retry_delay is not valid") ErrJobRetryStrategyIsNotValid = errors.New("queue.postgresql: retry_strategy is not valid") ErrJobTimeoutIsNotValid = errors.New("queue.postgresql: timeout is not valid") )
Functions ¶
This section is empty.
Types ¶
type PostgreSQLQueue ¶
type PostgreSQLQueue struct {
// contains filtered or unexported fields
}
func NewPostgreSQLQueue ¶
func (*PostgreSQLQueue) GetFailedJobs ¶
func (*PostgreSQLQueue) Pull ¶
func (pgqueue *PostgreSQLQueue) Pull(ctx context.Context, numberOfJobs uint64) (ret []queue.Job, err error)
pull fetches at most `number_of_jobs` from the queue.
func (*PostgreSQLQueue) Push ¶
func (pgqueue *PostgreSQLQueue) Push(ctx context.Context, tx db.Queryer, newJob queue.NewJobInput) (err error)
func (*PostgreSQLQueue) PushMany ¶
func (pgqueue *PostgreSQLQueue) PushMany(ctx context.Context, newJobs []queue.NewJobInput) (err error)
Click to show internal directories.
Click to hide internal directories.