engine

package
v0.0.0-...-66c6b2d Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 2 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   IConcurrent
	WorkerCount int
	ItemChan    chan Item
}

func (*ConcurrentEngine) Run

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

type IConcurrent

type IConcurrent interface {
	// contains filtered or unexported methods
}

type IQueued

type IQueued interface {
	WorkerReady(chan Request)
	// contains filtered or unexported methods
}

type Item

type Item struct {
	Id      string      `db:"id"`
	Url     string      `db:"url"`
	Type    string      `db:"type"`
	Payload interface{} `db:"payload"`
}

type ParseResult

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

func NilParser

func NilParser([]byte) ParseResult

type QueuedEngine

type QueuedEngine struct {
	Scheduler   IQueued
	WorkerCount int
}

func (*QueuedEngine) Run

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

type Request

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

type SimpleEngine

type SimpleEngine struct {
}

func (SimpleEngine) Run

func (engine SimpleEngine) Run(seeds ...Request)

Jump to

Keyboard shortcuts

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