Skip to content

Commit

Permalink
apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuker committed Dec 6, 2023
1 parent 8d8d1a9 commit cf748d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ func (s *site) nextProxy() (*Backend, func()) {
return nil, func() {}
}
switch globalHostBalance {
case "leastconn":
case "least":
min := int64(math.MaxInt32)
earliest := time.Now().Add(time.Second).UnixNano()
idx := 0
Expand Down Expand Up @@ -840,7 +840,7 @@ func sidekickMain(ctx *cli.Context) {
globalStatusCodes = ctx.GlobalIntSlice("status-code")
globalHostBalance = ctx.GlobalString("host-balance")
if globalHostBalance == "" {
globalHostBalance = "leastconn"
globalHostBalance = "least"
}

go func() {
Expand Down Expand Up @@ -1006,7 +1006,7 @@ func main() {
},
cli.StringFlag{
Name: "host-balance",
Usage: "set host balance as leastconn or random",
Usage: "set host balance as least or random",
},
}
app.CustomAppHelpTemplate = `NAME:
Expand Down Expand Up @@ -1043,8 +1043,8 @@ EXAMPLES:
6. Sidekick as TLS terminator:
$ sidekick --cert public.crt --key private.key --health-path=/minio/health/cluster http://site1-minio{1...4}:9000
7. Load balance across 4 MinIO Servers (http://minio1:9000 to http://minio4:9000), Set host balance as leastconn
$ sidekick ----host-balance=leastconn "/minio/health/cluster" http://minio{1...4}:9000
7. Load balance across 4 MinIO Servers (http://minio1:9000 to http://minio4:9000), Set host balance as least
$ sidekick --host-balance=least --health-path="/minio/health/cluster" http://minio{1...4}:9000
`
app.Action = sidekickMain
app.Run(os.Args)
Expand Down

0 comments on commit cf748d8

Please sign in to comment.