collector

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

结果收集与输出

Index

Constants

This section is empty.

Variables

View Source
var (
	// 全局支持的输出方式
	DataOutput = make(map[string]func(self *Collector) error)

	// 全局支持的文本数据输出方式名称列表
	DataOutputLib []string
)

Functions

This section is empty.

Types

type Collector

type Collector struct {
	*spider.Spider                    //绑定的采集规则
	DataChan       chan data.DataCell //文本数据收集通道
	FileChan       chan data.FileCell //文件收集通道
	// contains filtered or unexported fields
}

结果收集与输出

func NewCollector

func NewCollector(sp *spider.Spider) *Collector

func (*Collector) CollectData

func (self *Collector) CollectData(dataCell data.DataCell) error

func (*Collector) CollectFile

func (self *Collector) CollectFile(fileCell data.FileCell) error

func (*Collector) Report

func (self *Collector) Report()

返回报告

func (*Collector) Start

func (self *Collector) Start()

启动数据收集/输出管道

func (*Collector) Stop

func (self *Collector) Stop()

停止

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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