Browse Source

update 修改结构名称

pull/2/head
lucas 2 weeks ago
parent
commit
075f8b40d3
  1. 4
      consumers/consumerSinoGnssMySQL.go
  2. 6
      monitors/commonMonitor.go

4
consumers/consumerSinoGnssMySQL.go

@ -20,7 +20,7 @@ type consumerSinoGnssMySQL struct {
Info SinoGnssMySQL.ConfigFile Info SinoGnssMySQL.ConfigFile
InDB *dbOperate.DBHelper InDB *dbOperate.DBHelper
outMqtt *dbOperate.MqttHelper outMqtt *dbOperate.MqttHelper
monitor *monitors.CommonMonitorMonitor monitor *monitors.CommonMonitor
} }
func (the *consumerSinoGnssMySQL) LoadConfigJson(cfgStr string) { func (the *consumerSinoGnssMySQL) LoadConfigJson(cfgStr string) {
@ -47,7 +47,7 @@ func (the *consumerSinoGnssMySQL) InputInitial() error {
the.InDB = dbOperate.NewDBHelper( the.InDB = dbOperate.NewDBHelper(
the.Info.IoConfig.In.Db.Type, the.Info.IoConfig.In.Db.Type,
the.Info.IoConfig.In.Db.ConnStr) the.Info.IoConfig.In.Db.ConnStr)
the.monitor = &monitors.CommonMonitorMonitor{ the.monitor = &monitors.CommonMonitor{
MonitorHelper: &monitors.MonitorHelper{CronStr: the.Info.IoConfig.In.CronStr}, MonitorHelper: &monitors.MonitorHelper{CronStr: the.Info.IoConfig.In.CronStr},
} }
the.monitor.Start() the.monitor.Start()

6
monitors/commonMonitor.go

@ -1,14 +1,14 @@
package monitors package monitors
type CommonMonitorMonitor struct { type CommonMonitor struct {
*MonitorHelper *MonitorHelper
} }
func (the *CommonMonitorMonitor) RegisterFun(fun func()) { func (the *CommonMonitor) RegisterFun(fun func()) {
the.registerFun(fun) the.registerFun(fun)
} }
func (the *CommonMonitorMonitor) Start() { func (the *CommonMonitor) Start() {
the.initial() the.initial()
the.monitorStart() the.monitorStart()
} }

Loading…
Cancel
Save