Browse Source

修改

master
xyiege 5 months ago
parent
commit
b47d6881de
  1. 2
      aufs/core/dtmem.go
  2. 5
      scagent/core/JsonRpc.go

2
aufs/core/dtmem.go

@ -37,7 +37,7 @@ func Dtmem(w http.ResponseWriter, r *http.Request) {
}
// 调用远程方法
var reply string
var args = Args{"."}
var args = Args{"D:\\aaa"}
err = client.Call("FileRpcService.GetFilePath", args, &reply)
if err != nil {
fmt.Fprintf(w, "jsonrpc call faild %v", err)

5
scagent/core/JsonRpc.go

@ -16,7 +16,7 @@ type Args struct {
// 返回的参数
type Reply struct {
FilePath string `json:"file_path"`
Redata string
}
// 返回的json数据
@ -78,7 +78,8 @@ func (f *FileRpc) GetFilePath(args *Args, replay *Reply) error {
logger.Error("转换为json字符串出错", zap.Error(err))
return err
}
replay.FilePath = string(jsonStr)
// fmt.Printf("jsonStr: %s\n", jsonStr)
replay.Redata = string(jsonStr)
return nil
}

Loading…
Cancel
Save