Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConfig ¶
type BaseConfig struct { Enabled bool `json:"enabled"` Interval string `json:"interval"` // e.g. "10s", "1m", "1h" MaxRetries int64 `json:"maxRetries"` }
func (*BaseConfig) ProcessingInterval ¶
func (c *BaseConfig) ProcessingInterval() taskprocessor.ProcessingInterval
func (*BaseConfig) Validate ¶
func (c *BaseConfig) Validate() error
Validate checks the correctness of the base config values.
type BatchJob ¶
type BatchJob struct { BaseConfig // contains filtered or unexported fields }
func NewBatchJob ¶
func NewBatchJob(options ...BatchJobConfigOption) *BatchJob
type BatchJobConfigOption ¶
type BatchJobConfigOption func(*BatchJob)
func WithBaseConfig ¶
func WithBaseConfig(cfg BaseConfig) BatchJobConfigOption
func WithTask ¶
func WithTask(task *asynq.Task) BatchJobConfigOption
func WithTaskId ¶
func WithTaskId(taskId *string) BatchJobConfigOption
type BatchJobs ¶
type BatchJobs struct {
// contains filtered or unexported fields
}
func NewBatchJobs ¶
func NewBatchJobs(options ...BatchJobsOption) *BatchJobs
type BatchJobsOption ¶
type BatchJobsOption func(*BatchJobs)
func WithBatchJob ¶
func WithBatchJob(batchJob *BatchJob) BatchJobsOption
WithBatchJobs sets the batch jobs for the batcher.
func WithBatchJobs ¶
func WithBatchJobs(batchJobs *BatchJobs) BatchJobsOption
type Batcher ¶
type Batcher struct {
// contains filtered or unexported fields
}
func NewBatcher ¶
func NewBatcher(options ...BatcherOption) *Batcher
NewBatcher creates a new batcher.
type BatcherOption ¶
type BatcherOption func(*Batcher)
func WithBatchJobsRef ¶
func WithBatchJobsRef(batchJobs *BatchJobs) BatcherOption
WithBatchJobs sets the batch jobs for the batcher.
func WithTaskProcessor ¶
func WithTaskProcessor(processor *taskprocessor.TaskProcessor) BatcherOption
WithTaskProcessor sets the task processor for the batcher.
Click to show internal directories.
Click to hide internal directories.