Skip to content

Commit

Permalink
Add Healthy field for Load balancer pool struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Gracia committed Nov 15, 2023
1 parent 871524d commit 9a5f615
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/1441.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
load_balancing: add healthy field to LoadBalancerPool
```
1 change: 1 addition & 0 deletions load_balancing.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type LoadBalancerPool struct {
Longitude *float32 `json:"longitude,omitempty"`
LoadShedding *LoadBalancerLoadShedding `json:"load_shedding,omitempty"`
OriginSteering *LoadBalancerOriginSteering `json:"origin_steering,omitempty"`
Healthy bool `json:"healthy,omitempty"`

// CheckRegions defines the geographic region(s) from where to run health-checks from - e.g. "WNAM", "WEU", "SAF", "SAM".
// Providing a null/empty value means "all regions", which may not be available to all plan types.
Expand Down
4 changes: 3 additions & 1 deletion load_balancing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ func TestCreateLoadBalancerPool(t *testing.T) {
"notification_email": "someone@example.com",
"check_regions": [
"WEU"
]
],
"healthy": true
}
}`)
}
Expand Down Expand Up @@ -143,6 +144,7 @@ func TestCreateLoadBalancerPool(t *testing.T) {
CheckRegions: []string{
"WEU",
},
Healthy: true,
}
request := LoadBalancerPool{
Description: "Primary data center - Provider XYZ",
Expand Down

0 comments on commit 9a5f615

Please sign in to comment.