MCPcopy
hub / github.com/ltaoo/wx_channels_download / FetcherManager

Interface FetcherManager

pkg/gopeed/internal/fetcher/fetcher.go:106–126  ·  view source on GitHub ↗

FetcherManager manage and control the fetcher

Source from the content-addressed store, hash-verified

104
105// FetcherManager manage and control the fetcher
106type FetcherManager interface {
107 // Name return the name of the protocol.
108 Name() string
109 // Filters registers the supported schemes.
110 Filters() []*SchemeFilter
111 // Build returns a new fetcher.
112 Build() Fetcher
113 // ParseName name displayed when the task is not yet resolved, parsed from the request URL
114 ParseName(u string) string
115 // AutoRename returns whether the fetcher need renaming the download file when has the same name file.
116 AutoRename() bool
117
118 // DefaultConfig returns the default configuration of the protocol.
119 DefaultConfig() any
120 // Store fetcher
121 Store(fetcher Fetcher) (any, error)
122 // Restore fetcher
123 Restore() (v any, f func(meta *FetcherMeta, v any) Fetcher)
124 // Close the fetcher manager, release resources.
125 Close() error
126}
127
128type DefaultFetcher struct {
129 Ctl *controller.Controller

Callers 23

installCertificateFunction · 0.65
installCertificateFunction · 0.65
writeSystemCertFunction · 0.65
CopyDirFunction · 0.65
SetupMethod · 0.65
setupFetcherMethod · 0.65
doCreateMethod · 0.65
fetchMethod · 0.65
parseFmMethod · 0.65
restoreFetcherMethod · 0.65
buildFetcherMethod · 0.65
NameMethod · 0.65

Implementers 4

FetcherManagerpkg/gopeed/internal/protocol/http/fetc
FetcherManagerpkg/gopeed/internal/protocol/zip/fetch
FetcherManagerpkg/gopeed/internal/protocol/stream/fe
FetcherManagerpkg/gopeed/internal/protocol/officiala

Calls

no outgoing calls

Tested by

no test coverage detected