Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer interface { Id() uint32 // 获得ID。 Analyze( respParsers []ParseResponse, resp base.Response) ([]base.Data, []error) // 根据规则分析响应并返回请求和条目。 }
分析器的接口类型。
type AnalyzerPool ¶
type AnalyzerPool interface { Take() (Analyzer, error) // 从池中取出一个分析器。 Return(analyzer Analyzer) error // 把一个分析器归还给池。 Total() uint32 // 获得池的总容量。 Used() uint32 // 获得正在被使用的分析器的数量。 }
分析器池的接口类型。
func NewAnalyzerPool ¶
func NewAnalyzerPool( total uint32, gen GenAnalyzer) (AnalyzerPool, error)
Click to show internal directories.
Click to hide internal directories.