MCPcopy Create free account
hub / github.com/chainreactors/spray / Handler

Method Handler

core/pool/checkpool.go:214–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212}
213
214func (pool *CheckPool) Handler() {
215 defer close(pool.handlerDone)
216 for bl := range pool.processCh {
217 if bl.IsValid {
218 params := map[string]interface{}{
219 "current": bl,
220 }
221 if pool.MatchExpr != nil && pkg.CompareWithExpr(pool.MatchExpr, params) {
222 bl.IsValid = true
223 }
224 }
225 if bl.Source == parsers.CheckSource {
226 pool.Bar.Done()
227 }
228 pool.recordCheckStat(bl)
229 pool.putToOutput(bl)
230 pool.wg.Done()
231 }
232}
233
234func (pool *CheckPool) recordCheckStat(bl *baseline.Baseline) {
235 if pool.Statistor == nil || bl == nil || bl.SprayResult == nil {

Callers 1

NewCheckPoolFunction · 0.95

Calls 4

recordCheckStatMethod · 0.95
CompareWithExprFunction · 0.92
putToOutputMethod · 0.80
DoneMethod · 0.45

Tested by

no test coverage detected