feat: ue事件推入ws
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"ems.agt/lib/global"
|
||||
"ems.agt/lib/log"
|
||||
"ems.agt/lib/services"
|
||||
wsService "ems.agt/src/modules/ws/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -17,12 +18,12 @@ var (
|
||||
)
|
||||
|
||||
type UEEvent struct {
|
||||
NeType string `json:"-" xorm:"ne_type"`
|
||||
NeName string `json:"-" xorm:"ne_name"`
|
||||
RmUID string `json:"-" xorm:"rm_uid"`
|
||||
Timestamp int `json:"-" xorm:"timestamp"`
|
||||
EventType string `json:"-" xorm:"event_type"`
|
||||
EventJson map[string]any `json:"-" xorm:"event_json"`
|
||||
NeType string `json:"neType" xorm:"ne_type"`
|
||||
NeName string `json:"neName" xorm:"ne_name"`
|
||||
RmUID string `json:"rmUID" xorm:"rm_uid"`
|
||||
Timestamp int `json:"timestamp" xorm:"timestamp"`
|
||||
EventType string `json:"eventType" xorm:"event_type"`
|
||||
EventJson map[string]any `json:"eventJSON" xorm:"event_json"`
|
||||
}
|
||||
|
||||
func PostUEEventFromAMF(c *gin.Context) {
|
||||
@@ -61,5 +62,8 @@ func PostUEEventFromAMF(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// 推送到ws订阅组
|
||||
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_UE, ueEvent)
|
||||
|
||||
services.ResponseStatusOK204NoContent(c.Writer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user