From 13642d7402ca6a2adcd3a37b73fe0cc68d407a20 Mon Sep 17 00:00:00 2001 From: orgin Date: Tue, 19 Apr 2022 09:26:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Ename=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node/node.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node/node.go b/node/node.go index 1af2a81..5697686 100644 --- a/node/node.go +++ b/node/node.go @@ -39,6 +39,7 @@ func init() { signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM,syscall.Signal(10)) console.RegisterCommandBool("help",false,"<-help> This help.",usage) + console.RegisterCommandString("name","","<-name nodeName> Node's name.",setName) console.RegisterCommandString("start","","<-start nodeid=nodeid> Run originserver.",startNode) console.RegisterCommandString("stop","","<-stop nodeid=nodeid> Stop originserver process.",stopNode) console.RegisterCommandString("config","","<-config path> Configuration file path.",setConfigPath) @@ -64,6 +65,10 @@ func usage(val interface{}) error{ return nil } +func setName(val interface{}) error { + return nil +} + func setPprof(val interface{}) error { listenAddr := val.(string) if listenAddr==""{