Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crawler ¶
type Crawler interface { Init(*spider.Spider, ...logs.Logs) Crawler //初始化采集引擎 Run() //运行任务 Stop() //主动终止 CanStop() bool //能否终止 GetId() int //获取引擎ID Report(...bool) *cache.Report }
采集引擎
type SpiderQueue ¶
type SpiderQueue interface { Reset() //重置清空队列 Add(*spider.Spider) AddAll([]*spider.Spider) AddKeyins(string) //为队列成员遍历添加Keyin属性,但前提必须是队列成员未被添加过keyin GetByIndex(int) *spider.Spider GetByName(string) *spider.Spider GetAll() []*spider.Spider Len() int // 返回队列长度 }
采集引擎中规则队列
func NewSpiderQueue ¶
func NewSpiderQueue() SpiderQueue
Click to show internal directories.
Click to hide internal directories.