Task is an interface which encapsulates an activity which can be logged.
| 4 | |
| 5 | // Task is an interface which encapsulates an activity which can be logged. |
| 6 | type Task interface { |
| 7 | // Updates returns a channel which is written to with the current state |
| 8 | // of the Task when an update is present. It is closed when the task is |
| 9 | // complete. |
| 10 | Updates() <-chan *Update |
| 11 | |
| 12 | // Throttled returns whether or not updates from this task should be |
| 13 | // limited when being printed to a sink via *log.Logger. |
| 14 | // |
| 15 | // It is expected to return the same value for a given Task instance. |
| 16 | Throttled() bool |
| 17 | } |
| 18 | |
| 19 | // Update is a single message sent (S) from a Task at a given time (At). |
| 20 | type Update struct { |
no outgoing calls
no test coverage detected