MCPcopy
hub / github.com/GopeedLab/gopeed / FetcherManager

Interface FetcherManager

internal/fetcher/fetcher.go:108–128  ·  view source on GitHub ↗

FetcherManager manage and control the fetcher

Source from the content-addressed store, hash-verified

106
107// FetcherManager manage and control the fetcher
108type 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.

Callers 39

CopyDirFunction · 0.65
TestArchiveInfo_FieldsFunction · 0.65
executeScriptAtPathMethod · 0.65
SetupMethod · 0.65
setupFetcherMethod · 0.65
doCreateMethod · 0.65
parseFmMethod · 0.65
restoreFetcherMethod · 0.65
buildFetcherMethod · 0.65
buildFetcherFunction · 0.65

Implementers 3

FetcherManagerinternal/protocol/bt/fetcher.go
FetcherManagerinternal/protocol/ed2k/fetcher.go
FetcherManagerinternal/protocol/http/fetcher_manager

Calls

no outgoing calls

Tested by

no test coverage detected