From 083bbb1460e2c29ebfdded6716531c2b879e227c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Thu, 4 Nov 2021 11:14:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81info=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2PID=E3=80=81=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E7=AD=89=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/node.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/nodes/node.go b/internal/nodes/node.go index 5c917e9..7fed7d2 100644 --- a/internal/nodes/node.go +++ b/internal/nodes/node.go @@ -496,6 +496,16 @@ func (this *Node) listenSock() error { "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": _ = cmd.ReplyOk()