fix: adjustment directory structure
This commit is contained in:
28
proxy/canal/client_fsm.go
Normal file
28
proxy/canal/client_fsm.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package canal
|
||||
|
||||
import (
|
||||
"proxy/logger"
|
||||
"time"
|
||||
)
|
||||
|
||||
var CurState string= "init"
|
||||
func CanalFsm(addr string, username string, password string) {
|
||||
t := time.NewTimer(time.Second * 2)
|
||||
defer t.Stop()
|
||||
for {
|
||||
<-t.C// wait for next tick
|
||||
|
||||
//if config.Config.CanalServer.Standalone || (!config.Config.CanalServer.Standalone && rds.CheckIfRdbMaster() == true) {
|
||||
StartMyCanal(addr, username, password)
|
||||
logger.CanalLog.Warnf("Exit Canal!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
|
||||
t.Reset(time.Second * 3)
|
||||
/*} else {
|
||||
CurState = "idle"
|
||||
if config.Config.CanalServer.Reinit {
|
||||
config.Config.CanalServer.Reinit = false
|
||||
config.SavePcfCfg()
|
||||
}
|
||||
t.Reset(time.Second * 2)
|
||||
}*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user