repl: add status,help,host cmds
and don't re-apply task for local commands
This commit is contained in:
parent
4e0cc35c26
commit
48f1fce93d
16
rpc/repl.go
16
rpc/repl.go
|
@ -86,7 +86,7 @@ func RunREPL(f Fluter) {
|
|||
}
|
||||
}
|
||||
|
||||
case "address", "a":
|
||||
case "host", "address", "a":
|
||||
if len(args) == 1 {
|
||||
t.Address = args[0]
|
||||
}
|
||||
|
@ -131,14 +131,24 @@ func RunREPL(f Fluter) {
|
|||
}
|
||||
}
|
||||
|
||||
// the commands below don't affect the task, so we don't need to apply it to clients -> continue
|
||||
|
||||
case "metrics":
|
||||
f.toggleMetrics()
|
||||
printTask = false
|
||||
continue
|
||||
|
||||
case "status":
|
||||
fmt.Println(t)
|
||||
continue
|
||||
|
||||
case "help":
|
||||
printHelp()
|
||||
continue
|
||||
|
||||
default:
|
||||
printTask = false
|
||||
fmt.Print("[rán] unknown command. ")
|
||||
printHelp()
|
||||
continue
|
||||
}
|
||||
|
||||
if printTask {
|
||||
|
|
Loading…
Reference in New Issue