FILE / ScuroNeko/mtg

stats/init.go

Исходный файл и его история в репозитории.
FILE 358d42ec61f055071e7ba8e369dd92883a4ee0f3
Files
mtg/stats/init.go
T
2018-10-16 22:17:46 +03:00

23 lines
360 B
Go

package stats
import (
"github.com/juju/errors"
"github.com/9seconds/mtg/config"
)
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
}