load balancers: add new enable_backend_keepalive field

This commit is contained in:
Anit Gandhi 2020-03-16 17:48:22 -04:00
parent 4acd72d5f8
commit e534d34652
3 changed files with 50 additions and 44 deletions

View File

@ -3,6 +3,7 @@
## unreleased
- #310 Add BillingHistory service and List endpoint - @rbutler
- #316 load balancers: add new enable_backend_keepalive field - @anitgandhi
## [v1.32.0] - 2020-03-04

View File

@ -43,6 +43,7 @@ type LoadBalancer struct {
Tags []string `json:"tags,omitempty"`
RedirectHttpToHttps bool `json:"redirect_http_to_https,omitempty"`
EnableProxyProtocol bool `json:"enable_proxy_protocol,omitempty"`
EnableBackendKeepalive bool `json:"enable_backend_keepalive,omitempty"`
VPCUUID string `json:"vpc_uuid,omitempty"`
}
@ -66,6 +67,7 @@ func (l LoadBalancer) AsRequest() *LoadBalancerRequest {
Tag: l.Tag,
RedirectHttpToHttps: l.RedirectHttpToHttps,
EnableProxyProtocol: l.EnableProxyProtocol,
EnableBackendKeepalive: l.EnableBackendKeepalive,
HealthCheck: l.HealthCheck,
VPCUUID: l.VPCUUID,
}
@ -140,6 +142,7 @@ type LoadBalancerRequest struct {
Tags []string `json:"tags,omitempty"`
RedirectHttpToHttps bool `json:"redirect_http_to_https,omitempty"`
EnableProxyProtocol bool `json:"enable_proxy_protocol,omitempty"`
EnableBackendKeepalive bool `json:"enable_backend_keepalive,omitempty"`
VPCUUID string `json:"vpc_uuid,omitempty"`
}

View File

@ -831,6 +831,7 @@ func TestLoadBalancers_AsRequest(t *testing.T) {
},
RedirectHttpToHttps: true,
EnableProxyProtocol: true,
EnableBackendKeepalive: true,
VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6",
}
lb.DropletIDs = make([]int, 1, 2)
@ -870,6 +871,7 @@ func TestLoadBalancers_AsRequest(t *testing.T) {
DropletIDs: []int{12345},
RedirectHttpToHttps: true,
EnableProxyProtocol: true,
EnableBackendKeepalive: true,
VPCUUID: "880b7f98-f062-404d-b33c-458d545696f6",
}