Beispiel #1
0
func NewVisits(cfg Config, requests chan rcon.RCONQuery, ea events.Aggregator, db *sql.DB) *Visits {
	v := new(Visits)
	v.cfg = cfg
	v.requests = requests
	v.events = ea.Subscribe(v)
	v.db = db
	return v
}
Beispiel #2
0
func NewStats(cfg Config, requests chan rcon.RCONQuery, ea events.Aggregator, db *sql.DB) *Stats {
	s := new(Stats)
	s.cfg = cfg
	s.requests = requests
	s.events = ea.Subscribe(s)
	s.db = db
	return s
}