MCPcopy
hub / github.com/andeya/pholcus / NewCrawlerPool

Function NewCrawlerPool

app/crawler/crawlerpool.go:37–43  ·  view source on GitHub ↗

NewCrawlerPool creates a new crawler pool with the given Downloader.

(dl downloader.Downloader)

Source from the content-addressed store, hash-verified

35
36// NewCrawlerPool creates a new crawler pool with the given Downloader.
37func NewCrawlerPool(dl downloader.Downloader) CrawlerPool {
38 return &cq{
39 status: status.RUN,
40 dl: dl,
41 all: make([]Crawler, 0, config.Conf().CrawlsCap),
42 }
43}
44
45// SetPipelineConfig sets the output type and batch capacity for new crawlers.
46func (cq *cq) SetPipelineConfig(outType string, batchCap int) {

Callers 11

newLogicFunction · 0.92
InitMethod · 0.92
TestNewCrawlerPoolFunction · 0.85
TestCrawlerPool_ResetFunction · 0.85
TestCrawlerPool_StopFunction · 0.85

Calls 1

ConfFunction · 0.92