| 1234567891011121314151617181920212223 |
- package stats
-
- import (
- "github.com/juju/errors"
-
- "github.com/9seconds/mtg/config"
- )
-
- // Init initializes stats subsystem.
- func Init(conf *config.Config) error {
- if conf.StatsD.Enabled {
- client, err := newStatsd(conf)
- if err != nil {
- return errors.Annotate(err, "Cannot initialize statsd client")
- }
- go client.run()
- }
-
- go NewStats(conf).start()
- go startServer(conf)
-
- return nil
- }
|