engine

package
v0.0.0-...-9dec8c7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 3 Imported by: 0

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
}

func (*ConcurrentEngine) Run

func (e *ConcurrentEngine) Run(seeds ...Request)

type ParseResult

type ParseResult struct {
	Requests []Request
	Items    []interface{}
}

func NilParser

func NilParser([]byte) ParseResult

type ReadyNotifier

type ReadyNotifier interface {
	WorkerReady(chan Request)
}

type Request

type Request struct {
	Url        string
	ParserFunc func([]byte) ParseResult
}

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)

可以送很多种子

Jump to

Keyboard shortcuts

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