1
0

marge: 合并代码,包名变更be.ems

This commit is contained in:
TsMask
2024-03-18 15:22:47 +08:00
parent df904f5328
commit 78bd110b03
393 changed files with 7870 additions and 5170 deletions

View File

@@ -14,12 +14,12 @@ import (
"github.com/go-resty/resty/v2"
"github.com/gorilla/mux"
"ems.agt/lib/dborm"
"ems.agt/lib/global"
"ems.agt/lib/log"
"ems.agt/lib/services"
"ems.agt/restagent/config"
tokenConst "ems.agt/src/framework/constants/token"
"be.ems/lib/dborm"
"be.ems/lib/global"
"be.ems/lib/log"
"be.ems/lib/services"
"be.ems/restagent/config"
tokenConst "be.ems/src/framework/constants/token"
)
type CpuUsage struct {
@@ -756,6 +756,8 @@ func GetStateFromNF(w http.ResponseWriter, r *http.Request) {
result["ipAddress"] = ne.Ip
resp, err := client.R().
EnableTrace().
SetHeaders(map[string]string{tokenConst.HEADER_KEY: r.Header.Get(tokenConst.HEADER_KEY)}).
//SetHeaders(map[string]string{"accessToken": token}).
SetHeaders(map[string]string{"User-Agent": config.GetDefaultUserAgent()}).
SetHeaders(map[string]string{"Content-Type": "application/json;charset=UTF-8"}).
Get(requestURI2NF)

View File

@@ -11,7 +11,7 @@ import (
"syscall"
"time"
"ems.agt/lib/log"
"be.ems/lib/log"
"github.com/shirou/gopsutil/v3/cpu"
"github.com/shirou/gopsutil/v3/disk"
"github.com/shirou/gopsutil/v3/mem"

View File

@@ -1,7 +1,7 @@
package state
import (
"ems.agt/lib/log"
"be.ems/lib/log"
"github.com/shirou/gopsutil/cpu"
"github.com/shirou/gopsutil/disk"
"github.com/shirou/gopsutil/host"