mirror of
https://github.com/minio/minio.git
synced 2025-01-25 13:43:17 -05:00
Deprecate --listeners flag (#15900)
This commit is contained in:
parent
374abd1e7d
commit
de5070446d
@ -249,16 +249,7 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
|
|||||||
getCert = globalTLSCerts.GetCertificate
|
getCert = globalTLSCerts.GetCertificate
|
||||||
}
|
}
|
||||||
|
|
||||||
listeners := ctx.Int("listeners")
|
httpServer := xhttp.NewServer([]string{globalMinioAddr}).
|
||||||
if listeners == 0 {
|
|
||||||
listeners = 1
|
|
||||||
}
|
|
||||||
addrs := make([]string, 0, listeners)
|
|
||||||
for i := 0; i < listeners; i++ {
|
|
||||||
addrs = append(addrs, globalMinioAddr)
|
|
||||||
}
|
|
||||||
|
|
||||||
httpServer := xhttp.NewServer(addrs).
|
|
||||||
UseHandler(setCriticalErrorHandler(corsHandler(router))).
|
UseHandler(setCriticalErrorHandler(corsHandler(router))).
|
||||||
UseTLSConfig(newTLSConfig(getCert)).
|
UseTLSConfig(newTLSConfig(getCert)).
|
||||||
UseShutdownTimeout(ctx.Duration("shutdown-timeout")).
|
UseShutdownTimeout(ctx.Duration("shutdown-timeout")).
|
||||||
|
@ -57,10 +57,11 @@ var ServerFlags = []cli.Flag{
|
|||||||
EnvVar: "MINIO_ADDRESS",
|
EnvVar: "MINIO_ADDRESS",
|
||||||
},
|
},
|
||||||
cli.IntFlag{
|
cli.IntFlag{
|
||||||
Name: "listeners",
|
Name: "listeners", // Deprecated Oct 2022
|
||||||
Value: 1,
|
Value: 1,
|
||||||
Usage: "bind N number of listeners per ADDRESS:PORT",
|
Usage: "bind N number of listeners per ADDRESS:PORT",
|
||||||
EnvVar: "MINIO_LISTENERS",
|
EnvVar: "MINIO_LISTENERS",
|
||||||
|
Hidden: true,
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "console-address",
|
Name: "console-address",
|
||||||
@ -499,16 +500,7 @@ func serverMain(ctx *cli.Context) {
|
|||||||
getCert = globalTLSCerts.GetCertificate
|
getCert = globalTLSCerts.GetCertificate
|
||||||
}
|
}
|
||||||
|
|
||||||
listeners := ctx.Int("listeners")
|
httpServer := xhttp.NewServer([]string{globalMinioAddr}).
|
||||||
if listeners == 0 {
|
|
||||||
listeners = 1
|
|
||||||
}
|
|
||||||
addrs := make([]string, 0, listeners)
|
|
||||||
for i := 0; i < listeners; i++ {
|
|
||||||
addrs = append(addrs, globalMinioAddr)
|
|
||||||
}
|
|
||||||
|
|
||||||
httpServer := xhttp.NewServer(addrs).
|
|
||||||
UseHandler(setCriticalErrorHandler(corsHandler(handler))).
|
UseHandler(setCriticalErrorHandler(corsHandler(handler))).
|
||||||
UseTLSConfig(newTLSConfig(getCert)).
|
UseTLSConfig(newTLSConfig(getCert)).
|
||||||
UseShutdownTimeout(ctx.Duration("shutdown-timeout")).
|
UseShutdownTimeout(ctx.Duration("shutdown-timeout")).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user