支持info指令查询PID、版本号等信息

This commit is contained in:
GoEdgeLab
2021-11-04 11:15:22 +08:00
parent 90fb0a94ac
commit da25fc9d04

View File

@@ -499,6 +499,16 @@ func (this *APINode) listenSock() error {
"pid": os.Getpid(), "pid": os.Getpid(),
}, },
}) })
case "info":
exePath, _ := os.Executable()
_ = cmd.Reply(&gosock.Command{
Code: "info",
Params: map[string]interface{}{
"pid": os.Getpid(),
"version": teaconst.Version,
"path": exePath,
},
})
case "stop": case "stop":
_ = cmd.ReplyOk() _ = cmd.ReplyOk()