Documentation ¶
Index ¶
- func Crawler(running *int32, group *sync.WaitGroup, jbd *JobDB, dbd *DoneDB, config Config, ...)
- func GetChromeWSEndpoint() string
- func GetSize(db *DB) int
- func Ini()
- func InsertSpider(db *DB, title string, name string, url string)
- func Parser(running *int32, group *sync.WaitGroup, jbd *JobDB, dbd *DoneDB, config Config, ...)
- func Saver(running *int32, group *sync.WaitGroup, save <-chan interface{}, stat *Stat, ...)
- func Start(ctx *Content, config Config, url string, stat *Stat)
- type Config
- type Content
- type DB
- type DBLinkInfo
- type DoneDB
- type FindData
- type JobDB
- type LoopSpider
- type LoopSpiderSlot
- type LoopSpiderStatus
- type PageInfo
- type PageLinkInfo
- type SpiderData
- type Stat
- type URLInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetChromeWSEndpoint ¶
func GetChromeWSEndpoint() string
Types ¶
type LoopSpider ¶
type LoopSpider struct { Thread int Buffer int Cur string // contains filtered or unexported fields }
func NewLoopSpider ¶
func NewLoopSpider(lss LoopSpiderSlot) *LoopSpider
func (*LoopSpider) GetLoopSpiderStatus ¶
func (ls *LoopSpider) GetLoopSpiderStatus() LoopSpiderStatus
type LoopSpiderSlot ¶
type LoopSpiderStatus ¶
type PageInfo ¶
type PageInfo struct { UI URLInfo Title string Son []PageLinkInfo }
type PageLinkInfo ¶
type SpiderData ¶
type SpiderData struct {
// contains filtered or unexported fields
}
type Stat ¶
type Stat struct { CrawBePushJobNum int CrawChannelNum int CrawFunc string CrawNum int CrawRetrtyNum int CrawOKNum int64 CrawFailNum int CrawOKTotalTime int64 CrawOKAvgTime int64 ParseChannelNum int ParseNum int ParseValidNum int ParseSpawnNum int ParseFinishNum int ParseTooDeepNum int ParseJobNum int SaveChannelNum int SaveNum int InsertNum int64 InsertTotalTime int64 InsertAvgTime int64 JobInsertNum int64 JobInsertTotalTime int64 JobInsertAvgTime int64 JobPopNum int64 JobPopTotalTime int64 JobPopAvgTime int64 JobHasNum int64 JobHasTotalTime int64 JobHasAvgTime int64 DoneInsertNum int64 DoneInsertTotalTime int64 DoneInsertAvgTime int64 DoneHasNum int64 DoneHasTotalTime int64 DoneHasAvgTime int64 }
Click to show internal directories.
Click to hide internal directories.