Skip to content

Commit 158b2ea

Browse files
committed
Support max_use and max_lifetime backend parameters
1 parent 43f4a56 commit 158b2ea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

fastly/backend.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ type Backend struct {
2222
Hostname *string `mapstructure:"hostname"`
2323
KeepAliveTime *int `mapstructure:"keepalive_time"`
2424
MaxConn *int `mapstructure:"max_conn"`
25+
MaxUse *int `mapstructure:"max_use"`
26+
MaxLifetime *int `mapstructure:"max_lifetime"`
2527
MaxTLSVersion *string `mapstructure:"max_tls_version"`
2628
MinTLSVersion *string `mapstructure:"min_tls_version"`
2729
Name *string `mapstructure:"name"`
@@ -103,6 +105,10 @@ type CreateBackendInput struct {
103105
KeepAliveTime *int `url:"keepalive_time,omitempty"`
104106
// MaxConn is the maximum number of concurrent connections this backend will accept.
105107
MaxConn *int `url:"max_conn,omitempty"`
108+
// MaxUse is the maximum number of times an HTTP keepalive connection can be used. `0` is unlimited.
109+
MaxUse *int `url:"max_use,omitempty"`
110+
// MaxLifetime is the upper bound in milliseconds for how long an HTTP keepalive connection can be open before it is no longer used. `0` is unlimited.
111+
MaxLifetime *int `url:"max_lifetime,omitempty"`
106112
// MaxTLSVersion is the maximum allowed TLS version on SSL connections to this backend.
107113
MaxTLSVersion *string `url:"max_tls_version,omitempty"`
108114
// MinTLSVersion is the minimum allowed TLS version on SSL connections to this backend.
@@ -236,6 +242,10 @@ type UpdateBackendInput struct {
236242
KeepAliveTime *int `url:"keepalive_time,omitempty"`
237243
// MaxConn is the maximum number of concurrent connections this backend will accept.
238244
MaxConn *int `url:"max_conn,omitempty"`
245+
// MaxUse is the maximum number of times an HTTP keepalive connection can be used. `0` is unlimited.
246+
MaxUse *int `url:"max_use,omitempty"`
247+
// MaxLifetime is the upper bound in milliseconds for how long an HTTP keepalive connection can be open before it is no longer used. `0` is unlimited.
248+
MaxLifetime *int `url:"max_lifetime,omitempty"`
239249
// MaxTLSVersion is the maximum allowed TLS version on SSL connections to this backend.
240250
MaxTLSVersion *string `url:"max_tls_version,omitempty"`
241251
// MinTLSVersion is the minimum allowed TLS version on SSL connections to this backend.

0 commit comments

Comments
 (0)