base-golang/pkg/downloader/event.go
2024-07-23 10:23:43 +08:00

20 lines
384 B
Go

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
}