Download internal/task/manager.go from lin7zhi/OpenList: direct link, hf CLI and curl.
- Browser
- Download file 477 Bytes
-
https://huggingface.co/spaces/lin7zhi/OpenList/resolve/main/internal/task/manager.go
- Command line
-
hf download hf://spaces/lin7zhi/OpenList/internal/task/manager.go
-
curl -L -o manager.go https://huggingface.co/spaces/lin7zhi/OpenList/resolve/main/internal/task/manager.go
477 Bytes
| package task | |
| import ( | |
| "github.com/OpenListTeam/tache" | |
| ) | |
| type Manager[T tache.Task] interface { | |
| Add(task T) | |
| Cancel(id string) | |
| CancelAll() | |
| CancelByCondition(condition func(task T) bool) | |
| GetAll() []T | |
| GetByID(id string) (T, bool) | |
| GetByState(state ...tache.State) []T | |
| GetByCondition(condition func(task T) bool) []T | |
| Remove(id string) | |
| RemoveAll() | |
| RemoveByState(state ...tache.State) | |
| RemoveByCondition(condition func(task T) bool) | |
| Retry(id string) | |
| RetryAllFailed() | |
| } | |