mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-06 01:50:25 +08:00
支持info指令查询PID、版本号等信息
This commit is contained in:
@@ -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()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user