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 }
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 }