feat: ed2k protocol support (#1316)

This commit is contained in:
Levi authored and GitHub committed 2026-03-17 19:42:16 +08:00
1 parent f7b26753c1
commit 09f7c88ed3
35 files changed
+1129 -35

No files matched your search

+15
View File
@@ -127,6 +127,21 @@ type FetcherManager interface {
Close() error
}
// StatefulFetcherManager is an optional extension for protocols that keep
// shared client state outside individual task fetchers.
type StatefulFetcherManager interface {
SetStateStore(store ProtocolStateStore)
}
// ProtocolStateStore persists shared protocol state for a fetcher manager.
// Downloader provides the concrete storage backend, while the protocol decides
// when state should be loaded or flushed.
type ProtocolStateStore interface {
Load(v any) (bool, error)
Save(v any) error
Delete() error
}
type DefaultFetcher struct {
Ctl *controller.Controller
Meta *FetcherMeta