fix: adjustment directory structure

This commit is contained in:
zhangsz
2025-03-25 09:46:16 +08:00
parent e9b29a109d
commit 63ec6e5b14
167 changed files with 374 additions and 21127 deletions

28
proxy/canal/client_fsm.go Normal file
View 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)
}*/
}
}