Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMaxConcurrentJobsZero error = fmt.Errorf("maxConcurrentJobs must be greater than zero")
)
Functions ¶
Types ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(maxConcurrentJobs int, opts ...SchedulerOption) (*Scheduler, error)
type SchedulerOption ¶
func WithClock ¶
func WithClock(t clock) SchedulerOption
WithClock returns a SchedulerOption to inject a clock, default is time.Now
func WithJobStore ¶
func WithJobStore(js jobStore) SchedulerOption
WithJobStore returns a SchedulerOption to inject a jobStore, default is job.store
func WithLogger ¶
func WithLogger(l logger) SchedulerOption
WithLogger returns a SchedulerOption to inject a logger
func WithWaitGroup ¶
func WithWaitGroup(wg waitGroup) SchedulerOption
WithWaitGroup returns a SchedulerOption to inject a waitgroup, default is sync.WaitGroup This can be used to inject your own instance of sync.WaitGroup
Directories
¶
| Path | Synopsis |
|---|---|
|
extensions
|
|
|
internal
|
|
|
examples/basic
command
|
|
|
examples/circuitbreaker
command
|
|
|
examples/dynamicscheduling
command
|
|
|
examples/errorhandler
command
|
|
|
examples/redsync
command
|
|
|
examples/runid
command
|
|
Click to show internal directories.
Click to hide internal directories.