!108 feat:支持不同源数据库迁移

* feat:支持不同源数据库迁移
This commit is contained in:
zongyangleo
2024-03-15 09:01:51 +00:00
committed by Coder慌
parent 263dfa6be7
commit bd1e83989d
44 changed files with 3064 additions and 104 deletions

View File

@@ -12,6 +12,7 @@ func InitIoc() {
ioc.Register(new(dbSqlExecAppImpl), ioc.WithComponentName("DbSqlExecApp"))
ioc.Register(new(dbSqlAppImpl), ioc.WithComponentName("DbSqlApp"))
ioc.Register(new(dataSyncAppImpl), ioc.WithComponentName("DbDataSyncTaskApp"))
ioc.Register(new(dbTransferAppImpl), ioc.WithComponentName("DbTransferTaskApp"))
ioc.Register(newDbScheduler(), ioc.WithComponentName("DbScheduler"))
ioc.Register(new(DbBackupApp), ioc.WithComponentName("DbBackupApp"))
@@ -31,6 +32,7 @@ func Init() {
panic(fmt.Sprintf("初始化 DbBinlogApp 失败: %v", err))
}
GetDataSyncTaskApp().InitCronJob()
GetDbTransferTaskApp().InitJob()
InitDbFlowHandler()
})()
}
@@ -54,3 +56,6 @@ func GetDbBinlogApp() *DbBinlogApp {
func GetDataSyncTaskApp() DataSyncTask {
return ioc.Get[DataSyncTask]("DbDataSyncTaskApp")
}
func GetDbTransferTaskApp() DbTransferTask {
return ioc.Get[DbTransferTask]("DbTransferTaskApp")
}