Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Args interface { // 自检参数的有效性,并在必要时返回可以说明问题的错误值。 // 若结果值为nil,则说明未发现问题,否则就意味着自检未通过。 Check() error // 获得参数容器的字符串表现形式。 String() string }
参数容器的接口。
type ChannelArgs ¶
type ChannelArgs struct {
// contains filtered or unexported fields
}
通道参数的容器。
func NewChannelArgs ¶
func NewChannelArgs( reqChanLen uint, respChanLen uint, itemChanLen uint, errorChanLen uint) ChannelArgs
创建通道参数的容器。
func (*ChannelArgs) Check ¶
func (args *ChannelArgs) Check() error
func (*ChannelArgs) String ¶
func (args *ChannelArgs) String() string
type CrawlerError ¶
爬虫错误的接口。
func NewCrawlerError ¶
func NewCrawlerError(errType ErrorType, errMsg string) CrawlerError
创建一个新的爬虫错误。
type PoolBaseArgs ¶
type PoolBaseArgs struct {
// contains filtered or unexported fields
}
池基本参数的容器。
func NewPoolBaseArgs ¶
func NewPoolBaseArgs( pageDownloaderPoolSize uint32, analyzerPoolSize uint32) PoolBaseArgs
创建池基本参数的容器。
func (*PoolBaseArgs) AnalyzerPoolSize ¶
func (args *PoolBaseArgs) AnalyzerPoolSize() uint32
获得分析器池的尺寸。
func (*PoolBaseArgs) Check ¶
func (args *PoolBaseArgs) Check() error
func (*PoolBaseArgs) PageDownloaderPoolSize ¶
func (args *PoolBaseArgs) PageDownloaderPoolSize() uint32
获得网页下载器池的尺寸。
func (*PoolBaseArgs) String ¶
func (args *PoolBaseArgs) String() string
Click to show internal directories.
Click to hide internal directories.