Documentation
¶
Index ¶
- Variables
- type JobStatus
- type Options
- type Repository
- 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
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrJobIdsNotProvided = fmt.Errorf("job ids not provided") ErrJobNotFound = fmt.Errorf("job not found") )
Functions ¶
This section is empty.
Types ¶
type Repository ¶
func (*Repository[T]) JobStatuses ¶
func (*Repository[T]) PutBatch ¶
func (r *Repository[T]) PutBatch(ctx context.Context, args ...T) ([]int64, error)
func (*Repository[T]) PutBatchWithOpts ¶
func (*Repository[T]) PutWithOpts ¶
type Worker ¶
type Worker[T river.JobArgs] interface { Put(ctx context.Context, args T) (int64, error) PutBatch(ctx context.Context, args ...T) ([]int64, error) PutWithOpts(ctx context.Context, options Options, args T) (int64, error) PutBatchWithOpts(ctx context.Context, options Options, args ...T) ([]int64, error) JobStatuses(ctx context.Context, ids ...int64) ([]JobStatus, error) FetchJobs(ctx context.Context, ids ...int64) ([]*rivertype.JobRow, error) FetchJob(ctx context.Context, id int64) (*rivertype.JobRow, error) }
Click to show internal directories.
Click to hide internal directories.