event.go 384 B

12345678910111213141516171819
  1. package downloader
  2. type EventKey string
  3. const (
  4. EventKeyStart EventKey = "start"
  5. EventKeyPause EventKey = "pause"
  6. EventKeyContinue EventKey = "continue"
  7. EventKeyProgress EventKey = "progress"
  8. EventKeyError EventKey = "error"
  9. EventKeyDone EventKey = "done"
  10. EventKeyFinally EventKey = "finally"
  11. )
  12. type Event struct {
  13. Key EventKey
  14. Task *TaskInfo
  15. Err error
  16. }