Cron keeps track of any number of entries, invoking the associated func as specified by the schedule. It may be started, stopped, and the entries may be inspected while running.
| 11 | // specified by the schedule. It may be started, stopped, and the entries may |
| 12 | // be inspected while running. |
| 13 | type Cron struct { |
| 14 | entries []*Entry |
| 15 | chain Chain |
| 16 | stop chan struct{} |
| 17 | add chan *Entry |
| 18 | remove chan EntryID |
| 19 | snapshot chan chan []Entry |
| 20 | running bool |
| 21 | logger Logger |
| 22 | runningMu sync.Mutex |
| 23 | location *time.Location |
| 24 | parser ScheduleParser |
| 25 | nextID EntryID |
| 26 | jobWaiter sync.WaitGroup |
| 27 | } |
| 28 | |
| 29 | // ScheduleParser is an interface for schedule spec parsers that return a Schedule |
| 30 | type ScheduleParser interface { |
nothing calls this directly
no outgoing calls
no test coverage detected