FetcherManager manage and control the fetcher
| 106 | |
| 107 | // FetcherManager manage and control the fetcher |
| 108 | type FetcherManager interface { |
| 109 | // Name return the name of the protocol. |
| 110 | Name() string |
| 111 | // Filters registers the supported schemes. |
| 112 | Filters() []*SchemeFilter |
| 113 | // Build returns a new fetcher. |
| 114 | Build() Fetcher |
| 115 | // ParseName name displayed when the task is not yet resolved, parsed from the request URL |
| 116 | ParseName(u string) string |
| 117 | // AutoRename returns whether the fetcher need renaming the download file when has the same name file. |
| 118 | AutoRename() bool |
| 119 | |
| 120 | // DefaultConfig returns the default configuration of the protocol. |
| 121 | DefaultConfig() any |
| 122 | // Store fetcher |
| 123 | Store(fetcher Fetcher) (any, error) |
| 124 | // Restore fetcher |
| 125 | Restore() (v any, f func(meta *FetcherMeta, v any) Fetcher) |
| 126 | // Close the fetcher manager, release resources. |
| 127 | Close() error |
| 128 | } |
| 129 | |
| 130 | // StatefulFetcherManager is an optional extension for protocols that keep |
| 131 | // shared client state outside individual task fetchers. |
no outgoing calls
no test coverage detected