func (c *Condition) DoOnTracker(e *event.Event, dot func(*eventTracker)) { // c.Lock() et, ok := c.eventTrackers[e.IndexName()] if !ok { et = c.newTracker() c.eventTrackers[e.IndexName()] = et } dot(et) // c.Unlock() }
func (c *Condition) getTracker(e *event.Event) *eventTracker { if c.eventTrackers == nil { c.eventTrackers = make(map[string]*eventTracker) } et, ok := c.eventTrackers[e.IndexName()] if !ok { et = c.newTracker() c.eventTrackers[e.IndexName()] = et } return et }
// generate an index name by using group-by statements func (g grouper) genIndexName(e *event.Event) string { return e.IndexName() }