Skip to content

Commit ceda43a

Browse files
authored
Merge pull request #480 from jordigilh/add_route_options_field
Add Options field in the Route structure
2 parents 41fbb9e + 77d24aa commit ceda43a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

resource/route.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ type Route struct {
66
URL string `json:"url"`
77
Protocol string `json:"protocol"`
88
Port *int `json:"port"`
9+
Options *RouteOptions `json:"options"`
910
Destinations []RouteDestination `json:"destinations"`
1011

1112
Metadata *Metadata `json:"metadata"`
@@ -18,6 +19,7 @@ type RouteCreate struct {
1819
Host *string `json:"host,omitempty"`
1920
Path *string `json:"path,omitempty"`
2021
Port *int `json:"port"`
22+
Options *RouteOptions `json:"options,omitempty"`
2123
Metadata *Metadata `json:"metadata,omitempty"`
2224
}
2325

@@ -95,6 +97,11 @@ type RouteIncluded struct {
9597
Domains []*Domain `json:"domains"`
9698
}
9799

100+
// RouteOptions https://v3-apidocs.cloudfoundry.org/version/3.192.0/index.html#the-route-options-object
101+
type RouteOptions struct {
102+
LoadBalancing string `json:"loadbalancing"`
103+
}
104+
98105
// RouteIncludeType https://v3-apidocs.cloudfoundry.org/version/3.126.0/index.html#include
99106
type RouteIncludeType int
100107

testutil/template/route.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"host": "a-hostname",
88
"path": "/some_path",
99
"url": "a-hostname.a-domain.com/some_path",
10+
"options": {
11+
"loadbalancing": "round-robin"
12+
},
1013
"destinations": [
1114
{
1215
"guid": "385bf117-17f5-4689-8c5c-08c6cc821fed",

0 commit comments

Comments
 (0)