|
|
|
@ -27,7 +27,7 @@ func Dtmem(w http.ResponseWriter, r *http.Request) { |
|
|
|
} |
|
|
|
// 调用远程方法
|
|
|
|
var reply int |
|
|
|
err = client.Call("Service.GetFilePath", "hello", &reply) |
|
|
|
err = client.Call("core.FileRpc.GetFilePath", "/www", &reply) |
|
|
|
if err != nil { |
|
|
|
fmt.Fprintf(w, "jsonrpc call faild %v", err) |
|
|
|
return |
|
|
|
@ -35,6 +35,7 @@ func Dtmem(w http.ResponseWriter, r *http.Request) { |
|
|
|
// 打印返回值
|
|
|
|
fmt.Fprintf(w, "jsonrpc call success, reply: %d", reply) |
|
|
|
|
|
|
|
// 内存动态
|
|
|
|
dtm := Dtm{ |
|
|
|
TotalAlloc: fmt.Sprintf("%d", m.TotalAlloc), |
|
|
|
|
|
|
|
|