New returns a new ready-to-use Runner.
(d time.Duration)
| 35 | |
| 36 | // New returns a new ready-to-use Runner. |
| 37 | func New(d time.Duration) *Runner { |
| 38 | return &Runner{ |
| 39 | interrupt: make(chan os.Signal, 1), |
| 40 | complete: make(chan error), |
| 41 | timeout: time.After(d), |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | // Add attaches tasks to the Runner. A task is a function that |
| 46 | // takes an int ID. |
nothing calls this directly
no outgoing calls
no test coverage detected