Пример #1
0
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()
}
Пример #2
0
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
}
Пример #3
0
// generate an index name by using group-by statements
func (g grouper) genIndexName(e *event.Event) string {
	return e.IndexName()

}