6 log "github.com/sirupsen/logrus"
8 "github.com/bytom/vapor/toolbar/common"
9 "github.com/bytom/vapor/toolbar/precognitive/api"
10 "github.com/bytom/vapor/toolbar/precognitive/config"
11 "github.com/bytom/vapor/toolbar/precognitive/monitor"
15 cfg := config.NewConfig()
16 db, err := common.NewMySQLDB(cfg.MySQLConfig)
18 log.WithField("err", err).Panic("initialize mysql db error")
21 go monitor.NewMonitor(cfg, db).Run()
22 go api.NewApiServer(cfg, db).Run()
24 // keep the main func running in case of terminating goroutines