style: 变更ws模块函数实例命名

This commit is contained in:
TsMask
2024-09-24 11:51:46 +08:00
parent 0287852470
commit 67caba4379
11 changed files with 558 additions and 618 deletions

View File

@@ -62,12 +62,12 @@ func PostCDREventFrom(w http.ResponseWriter, r *http.Request) {
switch neInfo.NeType {
case "IMS":
if v, ok := cdrEvent.CDR["recordType"]; ok && (v == "MOC" || v == "MTSM") {
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_IMS_CDR+neInfo.NeId, cdrEvent)
wsService.NewWSSend.ByGroupID(wsService.GROUP_IMS_CDR+neInfo.NeId, cdrEvent)
}
case "SMF":
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_SMF_CDR+neInfo.NeId, cdrEvent)
wsService.NewWSSend.ByGroupID(wsService.GROUP_SMF_CDR+neInfo.NeId, cdrEvent)
case "SMSC":
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_SMSC_CDR+neInfo.NeId, cdrEvent)
wsService.NewWSSend.ByGroupID(wsService.GROUP_SMSC_CDR+neInfo.NeId, cdrEvent)
}
}

View File

@@ -74,7 +74,7 @@ func PostUEEventFromAMF(c *gin.Context) {
// AMF没有RmUID直接推送
// 推送到ws订阅组
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_AMF_UE, ueEvent)
wsService.NewWSSend.ByGroupID(wsService.GROUP_AMF_UE, ueEvent)
services.ResponseStatusOK204NoContent(c.Writer)
}
@@ -103,7 +103,7 @@ func PostUEEvent(w http.ResponseWriter, r *http.Request) {
if neInfo.RmUID == ueEvent.RmUID {
// 推送到ws订阅组
if ueEvent.NeType == "MME" {
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_MME_UE+neInfo.NeId, ueEvent)
wsService.NewWSSend.ByGroupID(wsService.GROUP_MME_UE+neInfo.NeId, ueEvent)
}
}

View File

@@ -324,11 +324,11 @@ func PostKPIReportFromNF(w http.ResponseWriter, r *http.Request) {
if neInfo.RmUID == kpiData.RmUid {
// 推送到ws订阅组
wsService.NewWSSendImpl.ByGroupID(fmt.Sprintf("%s%s_%s", wsService.GROUP_KPI, neInfo.NeType, neInfo.NeId), kpiEvent)
wsService.NewWSSend.ByGroupID(fmt.Sprintf("%s%s_%s", wsService.GROUP_KPI, neInfo.NeType, neInfo.NeId), kpiEvent)
// 推送自定义KPI到ws订阅组
wsService.NewWSSendImpl.ByGroupID(fmt.Sprintf("%s%s_%s", wsService.GROUP_KPI_C, neInfo.NeType, neInfo.NeId), kpiCEvent)
wsService.NewWSSend.ByGroupID(fmt.Sprintf("%s%s_%s", wsService.GROUP_KPI_C, neInfo.NeType, neInfo.NeId), kpiCEvent)
if neInfo.NeType == "UPF" {
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_KPI_UPF+neInfo.NeId, kpiEvent)
wsService.NewWSSend.ByGroupID(wsService.GROUP_KPI_UPF+neInfo.NeId, kpiEvent)
}
}
@@ -456,9 +456,9 @@ func PostGoldKPIFromNF(w http.ResponseWriter, r *http.Request) {
}
// 推送到ws订阅组
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_KPI, kpiEvent)
wsService.NewWSSend.ByGroupID(wsService.GROUP_KPI, kpiEvent)
if goldKpi.NEType == "UPF" {
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_KPI_UPF, kpiEvent)
wsService.NewWSSend.ByGroupID(wsService.GROUP_KPI_UPF, kpiEvent)
}
services.ResponseStatusOK204NoContent(w)