Skip to content

Commit

Permalink
Deleted old CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
kompotkot committed Dec 12, 2024
1 parent 842dbee commit 8f1029b
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 581 deletions.
51 changes: 42 additions & 9 deletions nodebalancer/cmd/nodebalancer/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,18 +514,51 @@ var CommonCommands = []*cli.Command{
},
},
},
{
Name: "configure",
Usage: "Generate nodebalancer configuration",
Action: func(cCtx *cli.Context) error {

return nil
},
},
{
Name: "server",
Usage: "Start nodebalancer server",
Action: func(cCtx *cli.Context) error {
Flags: []cli.Flag{
&cli.StringFlag{
Name: "config",
Aliases: []string{"c"},
Usage: "Path to configuration file",
Required: true,
},
&cli.StringFlag{
Name: "host",
Usage: "Server listening address",
Value: "127.0.0.1",
},
&cli.StringFlag{
Name: "port",
Aliases: []string{"p"},
Usage: "Server listening port",
Value: "8544",
},
&cli.BoolFlag{
Name: "healthcheck",
Usage: "Repeatedly send ping requests to the node to verify its availability",
},
&cli.BoolFlag{
Name: "debug",
Usage: "Show extended logs",
},
},
Action: func(c *cli.Context) error {
NB_ENABLE_DEBUG = c.Bool("debug")

var clientErr error
bugoutClient, clientErr = CreateBugoutClient()
if clientErr != nil {
return clientErr
}

CheckEnvVarSet()

servErr := Server(c.String("config"), c.String("host"), c.String("port"), c.Bool("healthcheck"))
if servErr != nil {
return servErr
}

return nil
},
Expand Down
Loading

0 comments on commit 8f1029b

Please sign in to comment.