feat: new ui (#1455)

This commit is contained in:
Levi authored and GitHub committed 2026-09-05 19:53:41 +08:00
1 parent 3be8db664c
commit 177c225f16
742 files changed
+59951 -5934

No files matched your search

+11 -2
View File
@@ -21,8 +21,9 @@ type Fetcher interface {
Pause() error
Close() error
// Stats refreshes health statistics and returns the latest information
Stats() any
// Stats returns both the durable protocol snapshot and transient runtime
// telemetry. Downloader persists Snapshot and keeps Runtime in memory only.
Stats() *Stats
// Meta returns the meta information of the download.
Meta() *FetcherMeta
// Progress returns the progress of the download.
@@ -31,6 +32,14 @@ type Fetcher interface {
Wait() error
}
// Stats separates protocol information that remains meaningful after a task
// stops from telemetry that is valid only while the fetcher is active.
// Protocols own both payload schemas; Downloader treats them as opaque values.
type Stats struct {
Snapshot any `json:"snapshot"`
Runtime any `json:"runtime"`
}
type Uploader interface {
Upload() error
UploadedBytes() int64