Exemplo n.º 1
0
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
}
Exemplo n.º 2
0
// 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
}
Exemplo n.º 3
0
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)

}