Versions in this module Expand all Collapse all v1 v1.0.2 Aug 15, 2025 v1.0.1 Aug 6, 2025 Changes in this version + var ErrJobIdsNotProvided = fmt.Errorf("job ids not provided") + var ErrJobNotFound = fmt.Errorf("job not found") + type JobStatus struct + JobID int64 + Status rivertype.JobState + type Options struct + MaxAttempts int + Metadata []byte + Pending bool + Priority int + Queue string + ScheduledAt time.Time + Tags []string + UniqueOpts river.UniqueOpts + type Repository struct + func New[T river.JobArgs](river *river.Client[pgx.Tx]) *Repository[T] + func (r *Repository[T]) FetchJob(ctx context.Context, id int64) (*rivertype.JobRow, error) + func (r *Repository[T]) FetchJobs(ctx context.Context, ids ...int64) ([]*rivertype.JobRow, error) + func (r *Repository[T]) JobStatuses(ctx context.Context, ids ...int64) ([]JobStatus, error) + func (r *Repository[T]) Put(ctx context.Context, args T) (int64, error) + func (r *Repository[T]) PutBatch(ctx context.Context, args ...T) ([]int64, error) + func (r *Repository[T]) PutBatchWithOpts(ctx context.Context, options Options, args ...T) ([]int64, error) + func (r *Repository[T]) PutWithOpts(ctx context.Context, options Options, args T) (int64, error) + type Worker interface + FetchJob func(ctx context.Context, id int64) (*rivertype.JobRow, error) + FetchJobs func(ctx context.Context, ids ...int64) ([]*rivertype.JobRow, error) + JobStatuses func(ctx context.Context, ids ...int64) ([]JobStatus, error) + Put func(ctx context.Context, args T) (int64, error) + PutBatch func(ctx context.Context, args ...T) ([]int64, error) + PutBatchWithOpts func(ctx context.Context, options Options, args ...T) ([]int64, error) + PutWithOpts func(ctx context.Context, options Options, args T) (int64, error)