Documentation
¶
Overview ¶
Package scheduler delivers durable Timebox messages when they become due
Index ¶
Constants ¶
View Source
const ( // DefaultRescanInterval controls discovery of changes from other processes DefaultRescanInterval = time.Second // DefaultRetryDelay controls local retry after scheduler errors DefaultRetryDelay = time.Second )
Variables ¶
View Source
var ( // ErrStoreRequired indicates a Scheduler has no Store ErrStoreRequired = errors.New("scheduler store is required") // ErrProcessorRequired indicates a Scheduler has no Processor ErrProcessorRequired = errors.New("scheduler processor is required") // ErrRetry leaves a due message active without logging the attempt ErrRetry = errors.New("retry scheduled message") // ErrInvalidRescanInterval indicates a non-positive rescan interval ErrInvalidRescanInterval = errors.New( "scheduler rescan interval must be positive", ) // ErrInvalidRetryDelay indicates a non-positive retry delay ErrInvalidRetryDelay = errors.New("scheduler retry delay must be positive") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Store *timebox.Store
Processor Processor
Clock Clock
TimerConstructor TimerConstructor
RescanInterval time.Duration
RetryDelay time.Duration
}
Config configures a disposable schedule runner
type Processor ¶
type Processor func(*timebox.Transaction, *timebox.Message) error
Processor changes state in response to one due message
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler maintains a disposable heap over durable schedule aggregates
type TimerConstructor ¶
TimerConstructor creates a Timer for a delay
Click to show internal directories.
Click to hide internal directories.