Versions in this module Expand all Collapse all v0 v0.0.1 Apr 10, 2021 Changes in this version + type Cron struct + func NewCron(cronExpression string) (*Cron, error) + func (c *Cron) Next() (time.Time, bool) + type Fixed struct + func NewFixed(duration time.Duration) (*Fixed, error) + func (f *Fixed) Next() (time.Time, bool) + type Logger interface + Debugw func(msg string, keysAndValues ...interface{}) + Errorw func(msg string, keysAndValues ...interface{}) + Fatalw func(msg string, keysAndValues ...interface{}) + Infow func(msg string, keysAndValues ...interface{}) + Named func(name string) Logger + Panicw func(msg string, keysAndValues ...interface{}) + Sync func() error + Warnw func(msg string, keysAndValues ...interface{}) + With func(args ...interface{}) Logger + func DefaultLogger() Logger + func NopLogger() Logger + type Once struct + func NewOnce(d time.Duration) (*Once, error) + func NewOnceTime(t time.Time) (*Once, error) + func (o *Once) Next() (time.Time, bool) + type Option interface + func WithConsoleMetrics(printEvery time.Duration) Option + func WithExpectedRunTime(d time.Duration) Option + func WithLogger(logger Logger) Option + func WithMetrics(metricsScope tally.Scope) Option + type Schedule struct + func NewSchedule(id string, timer Timer, jobFunc func(), opts ...Option) *Schedule + func (s *Schedule) Finish() + func (s *Schedule) Start() + func (s *Schedule) Stop() + type Scheduler struct + func NewScheduler(opts ...Option) *Scheduler + func (s *Scheduler) Add(id string, timer Timer, job func(), extraOpts ...Option) error + func (s *Scheduler) Start(id string) error + func (s *Scheduler) StartAll() + func (s *Scheduler) Stop(id string) error + func (s *Scheduler) StopAll() + type State int64 + const FINISHED + const NEW + const STARTED + const STOPPED + const STOPPING + func (s State) String() string + type Timer interface + Next func() (next time.Time, done bool)