Versions in this module Expand all Collapse all v0 v0.1.0 Dec 5, 2023 Changes in this version + type Builder struct + func NewBuilder[P, S any](baseURL string) *Builder[P, S] + func (b *Builder[P, S]) Build() *Client[P, S] + func (b *Builder[P, S]) Client(client *http.Client) *Builder[P, S] + func (b *Builder[P, S]) MaxBytes(maxBytes int64) *Builder[P, S] + func (b *Builder[P, S]) MaxRetries(maxRetries uint) *Builder[P, S] + func (b *Builder[P, S]) OnRetry(fn errorsext.OnRetryFn[error]) *Builder[P, S] + func (b *Builder[P, S]) PollBackoff(bo backoff.Exponential) *Builder[P, S] + func (b *Builder[P, S]) RetryBackoff(bo backoff.Exponential) *Builder[P, S] + type Client struct + func (c *Client[P, S]) Complete(ctx context.Context, queue, jobID string, runID uuid.UUID) error + func (c *Client[P, S]) Delete(ctx context.Context, queue, jobID string) error + func (c *Client[P, S]) Enqueue(ctx context.Context, mode job.EnqueueMode, jobs []job.New[P, S]) (err error) + func (c *Client[P, S]) Exists(ctx context.Context, queue, jobID string) (bool, error) + func (c *Client[P, S]) Get(ctx context.Context, queue, jobID string) (Option[job.Existing[P, S]], error) + func (c *Client[P, S]) Heartbeat(ctx context.Context, queue, jobID string, runID uuid.UUID, state Option[S]) (err error) + func (c *Client[P, S]) Next(ctx context.Context, queue string, numJobs uint) ([]job.Existing[P, S], error) + func (c *Client[P, S]) Poll(ctx context.Context, queue string, numJobs uint) ([]job.Existing[P, S], error) + func (c *Client[P, S]) Poller(queue string, runner Runner[P, S]) *PollBuilder[P, S, Runner[P, S]] + func (c *Client[P, S]) Requeue(ctx context.Context, mode job.EnqueueMode, queue, jobID string, ...) (err error) + type JobHelper struct + func (h JobHelper[P, S]) Complete(ctx context.Context) error + func (h JobHelper[P, S]) Delete(ctx context.Context) error + func (h JobHelper[P, S]) Exists(ctx context.Context) (bool, error) + func (h JobHelper[P, S]) Heartbeat(ctx context.Context, state Option[S]) error + func (h JobHelper[P, S]) InnerClient() *Client[P, S] + func (h JobHelper[P, S]) Job() job.Existing[P, S] + func (h JobHelper[P, S]) Requeue(ctx context.Context, mode job.EnqueueMode, jobs []job.New[P, S]) error + type PollBuilder struct + func (b *PollBuilder[P, S, R]) Build() *Poller[P, S, R] + func (b *PollBuilder[P, S, R]) NumWorkers(n int) *PollBuilder[P, S, R] + type Poller struct + func (p *Poller[P, S, R]) Start(ctx context.Context) (err error) + type Runner interface + Run func(ctx context.Context, helper JobHelper[P, S])