base-golang/pkg/downloader/event.go

20 lines
384 B
Go
Raw Normal View History

2024-07-23 10:23:43 +08:00
package downloader
type EventKey string
const (
EventKeyStart EventKey = "start"
EventKeyPause EventKey = "pause"
EventKeyContinue EventKey = "continue"
EventKeyProgress EventKey = "progress"
EventKeyError EventKey = "error"
EventKeyDone EventKey = "done"
EventKeyFinally EventKey = "finally"
)
type Event struct {
Key EventKey
Task *TaskInfo
Err error
}