mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
[优化]设备数据上传并发处理,添加队列,以及并发数控制
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package netbase
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"pandax/pkg/global/model"
|
||||
)
|
||||
|
||||
@@ -11,3 +12,11 @@ type DeviceEventInfo struct {
|
||||
Type string `json:"type"`
|
||||
RequestId string `json:"requestId"`
|
||||
}
|
||||
|
||||
func (j *DeviceEventInfo) Bytes() []byte {
|
||||
b, err := json.Marshal(j)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user