WithClock overrides the default real clock. Tests inject quartz.NewMock(t) to control time-dependent behavior such as heartbeat tickers and FinalizeStale timestamps.
(c quartz.Clock)
| 74 | // quartz.NewMock(t) to control time-dependent behavior such as |
| 75 | // heartbeat tickers and FinalizeStale timestamps. |
| 76 | func WithClock(c quartz.Clock) ServiceOption { |
| 77 | return func(s *Service) { |
| 78 | if c != nil { |
| 79 | s.clock = c |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | // CreateRunParams contains friendly inputs for creating a debug run. |
| 85 | type CreateRunParams struct { |
no outgoing calls