Runner runs a set of tasks within a given timeout and can be shut down on an operating system interrupt.
| 12 | // Runner runs a set of tasks within a given timeout and can be |
| 13 | // shut down on an operating system interrupt. |
| 14 | type Runner struct { |
| 15 | // interrupt channel reports a signal from the |
| 16 | // operating system. |
| 17 | interrupt chan os.Signal |
| 18 | |
| 19 | // complete channel reports that processing is done. |
| 20 | complete chan error |
| 21 | |
| 22 | // timeout reports that time has run out. |
| 23 | timeout <-chan time.Time |
| 24 | |
| 25 | // tasks holds a set of functions that are executed |
| 26 | // synchronously in index order. |
| 27 | tasks []func(int) |
| 28 | } |
| 29 | |
| 30 | // ErrTimeout is returned when a value is received on the timeout channel. |
| 31 | var ErrTimeout = errors.New("received timeout") |
nothing calls this directly
no outgoing calls
no test coverage detected