MCPcopy Create free account
hub / github.com/AdRoll/baker / updateValues

Method updateValues

filter/external_match.go:227–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

225}
226
227func (f *ExternalMatch) updateValues() error {
228 values := make(map[string]struct{})
229
230 for _, rurl := range f.cfg.evaluateURLs() {
231 m, err := f.processURL(rurl)
232 if err != nil {
233 return err
234 }
235 log.WithFields(log.Fields{"url": rurl, "unique": len(m)}).Info("Successfully (re)loaded values from file")
236 for k := range m {
237 values[k] = struct{}{}
238 }
239 }
240
241 f.mx.Lock()
242 f.values = values
243 f.mx.Unlock()
244 return nil
245}
246
247func (f *ExternalMatch) Stats() baker.FilterStats {
248 return baker.FilterStats{

Callers 1

NewExternalMatchFunction · 0.95

Calls 2

processURLMethod · 0.95
evaluateURLsMethod · 0.80

Tested by

no test coverage detected