func (p *Policy) CheckNotMatch(e *event.Event) bool { for k, m := range p.r_not_match { if m.MatchString(e.Get(k)) { return false } } return true }
// check if any of p's matches are satisfied by the event func (p *Policy) CheckMatch(e *event.Event) bool { for k, m := range p.r_match { // if the element does not match the regex pattern, the event does not fully match if !m.MatchString(e.Get(k)) { return false } } return true }
func (t *Tracker) trackEvent(e *event.Event) { // don't track internal events if len(e.Get(INTERNAL_TAG_NAME)) != 0 { return } t.total.inc() t.updateCounts(e) t.updateTimes(e) }