package
0.0.0-20250307173044-634e8ce82c05
Repository: https://github.com/sapcc/go-bits.git
Documentation: pkg.go.dev

# Functions

DefaultJitter returns a random duration within +/- 10% of the requested value.
NoJitter returns the input value unchanged.
NumGoroutines is an option for a Job that allows the Job to use multiple goroutines, up to the specified number.
ProcessMany finds and executes a given amount of tasks.
WithLabel is an option for a Job that prefills one of the CounterLabels declared in the job's metadata before each task.

# Structs

CronJob is a job loop that executes in a set interval.
JobMetadata contains metadata and common configuration for a job.
ProducerConsumerJob describes a job that has one goroutine (the "producer") selecting tasks from an external source and one or more goroutines (the "consumers") executing the tasks that have been selected.
TxGuardedJob is a specialization of ProducerConsumerJob, where each task corresponds to one row of a database table that needs to be worked on.

# Interfaces

Job describes a loop that executes instances of a specific type of task.

# Type aliases

Jitter is a strategy for randomizing task recurrence intervals.
Option is a configuration option for a Job.