File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ package v7
22
33import (
44 "code.cloudfoundry.org/cli/v9/actor/actionerror"
5- "code.cloudfoundry.org/cli/v9/api/cloudcontroller/ccversion"
6- "code.cloudfoundry.org/cli/v9/command"
5+ "code.cloudfoundry.org/cli/v9/api/cloudcontroller/ccversion"
6+ "code.cloudfoundry.org/cli/v9/command"
77 "code.cloudfoundry.org/cli/v9/command/flag"
8- "code.cloudfoundry.org/cli/v9/resources"
8+ "code.cloudfoundry.org/cli/v9/resources"
99)
1010
1111type MapRouteCommand struct {
@@ -34,10 +34,11 @@ func (cmd MapRouteCommand) Examples() string {
3434 return `
3535CF_NAME map-route my-app example.com # example.com
3636CF_NAME map-route my-app example.com --hostname myhost # myhost.example.com
37- CF_NAME map-route my-app example.com --hostname myhost -o loadbalancing=least-connection # myhost.example.com with a per-route option
3837CF_NAME map-route my-app example.com --hostname myhost --path foo # myhost.example.com/foo
3938CF_NAME map-route my-app example.com --hostname myhost --app-protocol http2 # myhost.example.com
4039CF_NAME map-route my-app example.com --hostname myhost --app-port 8090 # myhost.example.com
40+ CF_NAME map-route my-app example.com --hostname myhost -o loadbalancing=least-connection # myhost.example.com with a per-route option
41+ CF_NAME map-route my-app example.com -o loadbalancing=hash -o hash_header=My-Hash-Header # use hash-based routing for example.com
4142CF_NAME map-route my-app example.com --port 5000 # example.com:5000`
4243}
4344
Original file line number Diff line number Diff line change @@ -29,10 +29,13 @@ Update an existing HTTP route:
2929
3030func (cmd UpdateRouteCommand ) Examples () string {
3131 return `
32- CF_NAME update-route example.com -o loadbalancing=round-robin,
33- CF_NAME update-route example.com -o loadbalancing=least-connection,
34- CF_NAME update-route example.com -r loadbalancing,
35- CF_NAME update-route example.com --hostname myhost --path foo -o loadbalancing=round-robin`
32+ CF_NAME update-route example.com -o loadbalancing=round-robin # use round-robin load balancing for route
33+ CF_NAME update-route example.com -o loadbalancing=least-connection # use least-connection load balancing for route
34+ CF_NAME update-route example.com -o loadbalancing=hash -o hash_header=My-Hash-Header # use hash-based load balancing for route
35+ CF_NAME update-route example.com -o loadbalancing=hash -o hash_header=My-Hash-Header -o hash_balance=1.3 # use hash-based load balancing with balance factor
36+ CF_NAME update-route example.com -r loadbalancing # remove load balancing option
37+ CF_NAME update-route example.com --hostname myhost --path foo -o loadbalancing=round-robin # update route myhost.example.com/foo
38+ `
3639}
3740func (cmd UpdateRouteCommand ) Execute (args []string ) error {
3841 err := cmd .SharedActor .CheckTarget (true , true )
You can’t perform that action at this time.
0 commit comments