Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentEngine ¶
type ConcurrentEngine struct { Scheduler Scheduler WorkerCount int ItemChan chan Item RequestProcessor Processor }
func (*ConcurrentEngine) Run ¶
func (e *ConcurrentEngine) Run(seeds ...Request)
type FuncParser ¶
type FuncParser struct {
// contains filtered or unexported fields
}
func NewFuncParser ¶
func NewFuncParser(p ParserFunc, name string) *FuncParser
func (*FuncParser) Parse ¶
func (f *FuncParser) Parse(contents []byte, url string) ParseResult
func (*FuncParser) Serialize ¶
func (f *FuncParser) Serialize() (name string, args interface{})
type ParseResult ¶
func Worker ¶
func Worker(r Request) (ParseResult, error)
type Parser ¶
type Parser interface { Parse(contents []byte, url string) ParseResult Serialize() (name string, args interface{}) }
type ParserFunc ¶
type ParserFunc func(contents []byte, url string) ParseResult
type Processor ¶
type Processor func(Request) (ParseResult, error)
type ReadyNotifier ¶
type ReadyNotifier interface {
WorkerReady(chan Request)
}
type Scheduler ¶
type Scheduler interface { ReadyNotifier Submit(Request) WorkerChan() chan Request Run() }
type SimpleEngine ¶
type SimpleEngine struct{}
func (SimpleEngine) Run ¶
func (e SimpleEngine) Run(seeds ...Request)
Click to show internal directories.
Click to hide internal directories.