cybergrab

package module
v0.0.0-...-71e7732 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2015 License: MIT Imports: 10 Imported by: 0

README

cybergrab

A lean web-crawler library, written in Go.

For an example on how to use this library, see blackbox_test.go

Warning: This is meant to be run on a relatively powerful machine. It potentially spawns a lot of goroutines which may cause resource exhaustion on older machines or mobile devices.

Design

TBD

Documentation

Index

Constants

View Source
const (
	MAX_DOWNLOADS          = 30000
	MAX_WORKERS            = 30000
	WORKER_TIMEOUT_SECONDS = 5
)

Variables

View Source
var InvalidArgs error = errors.New("numWorkers/numDownloads too high")

///////////////////////////// / Public API /////////////////////////////

Functions

This section is empty.

Types

type CrawlPolicy

type CrawlPolicy interface {
	ShouldDownload(url string) bool
	ShouldCrawl(url string) bool
}

type Spider

type Spider interface {
	Crawl(seedURL string) error
}

func NewSpider

func NewSpider(policy CrawlPolicy, numDownloads uint, numWorkers uint) (Spider, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL