|
|
|
@@ -128,7 +128,7 @@ func GetResultFromElk(resultInfo ResultInfo, jsonStr []byte) (loaded int, totalV |
|
|
|
} |
|
|
|
err = json.Unmarshal([]byte(string(body)), &resultInfo) |
|
|
|
if err != nil { |
|
|
|
log.Info("Get resultJson failed", err) |
|
|
|
log.Error("Get resultJson failed", err) |
|
|
|
return 0, 0, err |
|
|
|
} |
|
|
|
|
|
|
|
@@ -220,9 +220,9 @@ func TagNameInit(MessageInfo string, Tagname string, Gte string, Lte string) (pr |
|
|
|
|
|
|
|
//向elk发送请求,将获取的结果只保留访问量,输入是初始化后的数据结构,返回访问量 |
|
|
|
func ViewInfo(viewInfo InputInfo) (totalView int, err error) { |
|
|
|
jsons, errs := json.Marshal(viewInfo) |
|
|
|
if errs != nil { |
|
|
|
log.Info("errs:", errs) |
|
|
|
jsons, err := json.Marshal(viewInfo) |
|
|
|
if err != nil { |
|
|
|
log.Error("jsons failed", err) |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
var jsonStr = []byte(jsons) |
|
|
|
|