Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Caches ¶
type Caches struct { Processing caches.ThreadSafeCache Crawled caches.ThreadSafeCache }
type Counters ¶
type Counters struct { Discovered counters.AtomicInt64 // Pages discovered so far Processing counters.AtomicInt64 // Pages that we need to complete processing Crawling counters.AtomicInt64 // Pages that we are currently crawling CrawlComplete counters.AtomicInt64 // Pages that we have CrawledId CrawlsQueued counters.AtomicInt64 // Pages currently queued for crawling }
type PageCrawler ¶
type PageCrawler struct { Config Config // contains filtered or unexported fields }
func NewDefaultPageCrawler ¶
func NewDefaultPageCrawler(workerCount int, filePath string) PageCrawler
func NewPageCrawler ¶
func NewPageCrawler(config Config) PageCrawler
type QueueWorker ¶
type QueueWorker interface {
Start(chans WorkerChannels, qCounter *counters.AtomicInt64, workCounter *counters.AtomicInt64, wg *sync.WaitGroup)
}
type Worker ¶
func (*Worker) Start ¶
func (w *Worker) Start(chans WorkerChannels, queueCounter *counters.AtomicInt64, workCounter *counters.AtomicInt64, wg *sync.WaitGroup)
type WorkerChannels ¶
type WorkerChannels struct { In chan WorkerJob Out chan WorkerResult Write chan pages.Page }
type WorkerResult ¶
Click to show internal directories.
Click to hide internal directories.