Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MissedFirings ¶
func MissedFirings(s types.Schedule, from time.Time, until time.Time, maxFirings int) ([]time.Time, error)
MissedFirings returns all firing times between `from` (exclusive) and `until` (inclusive) for the given schedule, capped at `maxFirings`. Only returns firings within the schedule's CatchupWindow relative to `until`. Returns nil if CatchupWindow is not set.
Types ¶
type Config ¶
type Config struct {
Store *store.RedisStore
Dispatcher Dispatcher
TickInterval time.Duration
Logger gochainedlog.Logger
// OrphanCheckInterval controls how often orphan run detection runs.
// Defaults to 30s. Set to 0 to disable.
OrphanCheckInterval time.Duration
}
Config holds scheduler configuration.
type Dispatcher ¶
type Dispatcher interface {
Dispatch(ctx context.Context, job *types.Job, attempt int) error
PublishEvent(event types.JobEvent)
}
Dispatcher is the interface the scheduler uses to dispatch work.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler runs on the leader node and periodically checks for due jobs.
Click to show internal directories.
Click to hide internal directories.