yidun检测、查询
This commit is contained in:
14
main.go
14
main.go
@@ -4,12 +4,13 @@ import (
|
||||
"cid/controller/app"
|
||||
"cid/controller/data"
|
||||
"cid/controller/mapping"
|
||||
controllerYidun "cid/controller/yidun"
|
||||
serviceYidun "cid/service/yidun"
|
||||
"fmt"
|
||||
|
||||
_ "gitea.com/red-future/common/config"
|
||||
|
||||
_ "gitea.com/red-future/common/consul"
|
||||
"gitea.com/red-future/common/http"
|
||||
"gitea.com/red-future/common/jaeger"
|
||||
_ "gitea.com/red-future/common/ragflow" // RAGFlow 客户端自动初始化
|
||||
_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
|
||||
_ "github.com/gogf/gf/contrib/nosql/redis/v2"
|
||||
"golang.org/x/net/context"
|
||||
@@ -19,6 +20,11 @@ func main() {
|
||||
ctx := context.Background()
|
||||
defer jaeger.ShutDown(ctx)
|
||||
|
||||
// 初始化易盾客户端
|
||||
if err := serviceYidun.InitYidunClients(ctx); err != nil {
|
||||
panic(fmt.Sprintf("初始化易盾客户端失败: %v", err))
|
||||
}
|
||||
|
||||
http.RouteRegister([]interface{}{
|
||||
// 平台管理
|
||||
data.Platform,
|
||||
@@ -30,6 +36,8 @@ func main() {
|
||||
mapping.DataMapping,
|
||||
// 应用管理
|
||||
app.Application,
|
||||
// 易盾内容安全
|
||||
controllerYidun.YidunController,
|
||||
})
|
||||
select {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user