mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 10:58:35 +08:00
规则链
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/XM-GO/PandaKit/biz"
|
||||
"github.com/XM-GO/PandaKit/restfulx"
|
||||
@@ -10,8 +9,6 @@ import (
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/kakuilan/kgo"
|
||||
"pandax/pkg/middleware"
|
||||
"pandax/pkg/rule_engine"
|
||||
"pandax/pkg/rule_engine/message"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
@@ -83,15 +80,3 @@ func (s *System) ConnectWs(request *restful.Request, response *restful.Response)
|
||||
la := rc.LoginAccount
|
||||
ws.Put(uint64(la.UserId), wsConn)
|
||||
}
|
||||
|
||||
func (s *System) TestRuleChain(request *restful.Request, response *restful.Response) {
|
||||
parameter := request.QueryParameter("code")
|
||||
instance, _ := rule_engine.NewRuleChainInstance([]byte(parameter))
|
||||
newMessage := message.NewMessage()
|
||||
instance.StartRuleChain(context.Background(), newMessage)
|
||||
|
||||
response.WriteEntity(map[string]any{
|
||||
"code": 200,
|
||||
"logs": []map[string]interface{}{},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user