API: Improve cli usage descriptions (#4401)

This commit is contained in:
Bill Zhong
2025-02-18 05:06:39 -03:30
committed by GitHub
parent 958b13ebb5
commit a1714cc4ce
17 changed files with 194 additions and 114 deletions

View File

@@ -13,25 +13,20 @@ import (
var cmdBalancerInfo = &base.Command{
CustomFlags: true,
UsageLine: "{{.Exec}} api bi [--server=127.0.0.1:8080] [balancer]...",
Short: "balancer information",
Short: "Retrieve balancer information",
Long: `
Get information of specified balancers, including health, strategy
and selecting. If no balancer tag specified, get information of
all balancers.
Retrieve information of specified balancers, including health, strategy and selecting.
If no balancer tag specified, information for all balancers is returned.
> Make sure you have "RoutingService" set in "config.api.services"
of server config.
> Ensure that "RoutingService" is enabled under "config.api.services" in the server configuration.
Arguments:
-json
Use json output.
-s, -server <server:port>
The API server address. Default 127.0.0.1:8080
-t, -timeout <seconds>
Timeout seconds to call API. Default 3
Timeout in seconds for calling API. Default 3
Example: