Skip to content

Commit

Permalink
add repl support
Browse files Browse the repository at this point in the history
  • Loading branch information
petedannemann committed Oct 11, 2023
1 parent 51cfd23 commit 5e87c2f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion pkg/cli/repl.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ var (
Text: "topics",
Description: "Get all topics",
},
{
Text: "users",
Description: "Get all users",
},
}

helpTableStr = helpTable()
Expand Down Expand Up @@ -239,7 +243,6 @@ func (r *Repl) executor(in string) {
log.Errorf("Error: %+v", err)
return
}

case "balance":
if err := command.checkArgs(2, 3, nil); err != nil {
log.Errorf("Error: %+v", err)
Expand Down Expand Up @@ -360,6 +363,15 @@ func (r *Repl) executor(in string) {
log.Errorf("Error: %+v", err)
return
}
case "users":
if err := command.checkArgs(2, 2, nil); err != nil {
log.Errorf("Error: %+v", err)
return
}
if err := r.cliRunner.GetUsers(ctx, nil); err != nil {
log.Errorf("Error: %+v", err)
return
}
default:
log.Error("Unrecognized input. Run 'help' for details on available commands.")
}
Expand Down Expand Up @@ -506,6 +518,10 @@ func helpTable() string {
" get topics",
"Get all topics",
},
{
" get users",
"Get all users",
},
{
" tail [topic] [optional filter regexp] [--raw]",
"Tail all messages in a topic",
Expand Down

0 comments on commit 5e87c2f

Please sign in to comment.