Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions command/v7/map_route_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package v7

import (
"code.cloudfoundry.org/cli/v9/actor/actionerror"
"code.cloudfoundry.org/cli/v9/api/cloudcontroller/ccversion"
"code.cloudfoundry.org/cli/v9/command"
"code.cloudfoundry.org/cli/v9/api/cloudcontroller/ccversion"
"code.cloudfoundry.org/cli/v9/command"
"code.cloudfoundry.org/cli/v9/command/flag"
"code.cloudfoundry.org/cli/v9/resources"
"code.cloudfoundry.org/cli/v9/resources"
)

type MapRouteCommand struct {
Expand Down Expand Up @@ -34,10 +34,11 @@ func (cmd MapRouteCommand) Examples() string {
return `
CF_NAME map-route my-app example.com # example.com
CF_NAME map-route my-app example.com --hostname myhost # myhost.example.com
CF_NAME map-route my-app example.com --hostname myhost -o loadbalancing=least-connection # myhost.example.com with a per-route option
CF_NAME map-route my-app example.com --hostname myhost --path foo # myhost.example.com/foo
CF_NAME map-route my-app example.com --hostname myhost --app-protocol http2 # myhost.example.com
CF_NAME map-route my-app example.com --hostname myhost --app-port 8090 # myhost.example.com
CF_NAME map-route my-app example.com --hostname myhost -o loadbalancing=least-connection # myhost.example.com with a per-route option
CF_NAME map-route my-app example.com -o loadbalancing=hash -o hash_header=My-Hash-Header # use hash-based routing for example.com
CF_NAME map-route my-app example.com --port 5000 # example.com:5000`
}

Expand Down
11 changes: 7 additions & 4 deletions command/v7/update_route_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ Update an existing HTTP route:

func (cmd UpdateRouteCommand) Examples() string {
return `
CF_NAME update-route example.com -o loadbalancing=round-robin,
CF_NAME update-route example.com -o loadbalancing=least-connection,
CF_NAME update-route example.com -r loadbalancing,
CF_NAME update-route example.com --hostname myhost --path foo -o loadbalancing=round-robin`
CF_NAME update-route example.com -o loadbalancing=round-robin # use round-robin load balancing for route
CF_NAME update-route example.com -o loadbalancing=least-connection # use least-connection load balancing for route
CF_NAME update-route example.com -o loadbalancing=hash -o hash_header=My-Hash-Header # use hash-based load balancing for route
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
CF_NAME update-route example.com -r loadbalancing # remove load balancing option
CF_NAME update-route example.com --hostname myhost --path foo -o loadbalancing=round-robin # update route myhost.example.com/foo
`
}
func (cmd UpdateRouteCommand) Execute(args []string) error {
err := cmd.SharedActor.CheckTarget(true, true)
Expand Down
Loading