Documentation ¶
Index ¶
- type Job
- type JobArgs
- type JobFn
- type JobLogger
- func (w *JobLogger) AddJob(ctx context.Context, job Job) error
- func (w *JobLogger) AddJobType(jobFn JobFn) error
- func (w *JobLogger) AddJobs(ctx context.Context, jobs []Job) error
- func (w *JobLogger) AddQueue(queue string, workers int) error
- func (w *JobLogger) Run(ctx context.Context) error
- func (w *JobLogger) RunJob(ctx context.Context, job Job) error
- func (w *JobLogger) Stop(ctx context.Context) error
- func (w *JobLogger) Use(jmw JobMiddleware)
- type JobMapper
- type JobMiddleware
- type JobQueue
- type JobRunLogger
- type JobWorker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { Queue string `json:"queue"` JobType string `json:"job_type" river:"unique"` JobArgs JobArgs `json:"job_args" river:"unique"` JobDeadline int64 `json:"job_deadline"` Unique bool `json:"unique"` }
Job defines a single job
type JobLogger ¶
type JobLogger struct { JobQueue // contains filtered or unexported fields }
func NewJobLogger ¶
func (*JobLogger) AddJobType ¶
func (*JobLogger) Use ¶
func (w *JobLogger) Use(jmw JobMiddleware)
type JobMapper ¶
type JobMapper struct {
// contains filtered or unexported fields
}
func NewJobMapper ¶
func NewJobMapper() *JobMapper
func (*JobMapper) AddJobType ¶
type JobMiddleware ¶
func NewJobRunLogger ¶
func NewJobRunLogger(logger zerolog.Logger) JobMiddleware
type JobQueue ¶
type JobQueue interface { Use(JobMiddleware) AddQueue(string, int) error AddJobType(JobFn) error AddJob(context.Context, Job) error AddJobs(context.Context, []Job) error RunJob(context.Context, Job) error Run(context.Context) error Stop(context.Context) error }
Job queue
type JobRunLogger ¶
type JobRunLogger struct { JobWorker // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.