Files
data-engine/main.go
2026-05-29 18:39:32 +08:00

32 lines
731 B
Go

package main
import (
"dataengine/controller/dict"
syncCtrl "dataengine/controller/sync"
syncSvc "dataengine/service/sync"
"gitea.com/red-future/common/http"
"gitea.com/red-future/common/jaeger"
_ "gitea.com/red-future/common/k3sconfig"
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
_ "github.com/gogf/gf/contrib/nosql/redis/v2"
"golang.org/x/net/context"
)
func main() {
ctx := context.Background()
defer jaeger.ShutDown(ctx)
// 启动自动同步(后台循环执行,首次全量后续增量)
syncSvc.InitAndStartAutoSync(ctx)
http.RouteRegister([]interface{}{
// 接口管理
dict.ApiInterface,
dict.DatasourcePlatform,
// 平台同步引擎
syncCtrl.PlatformSyncController,
})
select {}
}