event.go 321 B

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