6 "github.com/jinzhu/gorm"
7 log "github.com/sirupsen/logrus"
9 "github.com/vapor/toolbar/precog/config"
17 func NewMonitor(cfg *config.Config, db *gorm.DB) *monitor {
24 func (m *monitor) Run() {
25 if err := m.updateBootstrapNodes(); err != nil {
29 ticker := time.NewTicker(time.Duration(m.cfg.CheckFreqSeconds) * time.Second)
30 for ; true; <-ticker.C {
36 func (m *monitor) updateBootstrapNodes() error {
37 // TODO: updated existed nodes
38 // TODO: add new nodes
42 func (m *monitor) monitorRountine() error {
43 // TODO: dail, get lantency
44 // TODO: get blockhash by height, get latency
45 // TODO: update lantency, active_time and status