http urls monitor.

cache.go 219B

12345678910
  1. package cache
  2. var monitorCache map[string]bool = map[string]bool{}
  3. func CheckMonitor(url string, err error) bool {
  4. willNotice := monitorCache[url] != (err != nil)
  5. monitorCache[url] = err != nil
  6. return willNotice
  7. }