Add flush interval option on backend
This commit is contained in:
parent
c6dd1dccc3
commit
e6e9a86919
43 changed files with 420 additions and 85 deletions
|
@ -29,15 +29,16 @@ func (p *Provider) buildConfigurationV2(tasks []state.Task) *types.Configuration
|
|||
"getID": getID,
|
||||
|
||||
// Backend functions
|
||||
"getBackendName": getBackendName,
|
||||
"getCircuitBreaker": label.GetCircuitBreaker,
|
||||
"getLoadBalancer": label.GetLoadBalancer,
|
||||
"getMaxConn": label.GetMaxConn,
|
||||
"getHealthCheck": label.GetHealthCheck,
|
||||
"getBuffering": label.GetBuffering,
|
||||
"getServers": p.getServers,
|
||||
"getHost": p.getHost,
|
||||
"getServerPort": p.getServerPort,
|
||||
"getBackendName": getBackendName,
|
||||
"getCircuitBreaker": label.GetCircuitBreaker,
|
||||
"getLoadBalancer": label.GetLoadBalancer,
|
||||
"getMaxConn": label.GetMaxConn,
|
||||
"getHealthCheck": label.GetHealthCheck,
|
||||
"getBuffering": label.GetBuffering,
|
||||
"getResponseForwarding": label.GetResponseForwarding,
|
||||
"getServers": p.getServers,
|
||||
"getHost": p.getHost,
|
||||
"getServerPort": p.getServerPort,
|
||||
|
||||
// Frontend functions
|
||||
"getSegmentNameSuffix": getSegmentNameSuffix,
|
||||
|
|
|
@ -314,6 +314,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
withLabel(label.TraefikBackend, "foobar"),
|
||||
|
||||
withLabel(label.TraefikBackendCircuitBreakerExpression, "NetworkErrorRatio() > 0.5"),
|
||||
withLabel(label.TraefikBackendResponseForwardingFlushInterval, "10ms"),
|
||||
withLabel(label.TraefikBackendHealthCheckScheme, "http"),
|
||||
withLabel(label.TraefikBackendHealthCheckPath, "/health"),
|
||||
withLabel(label.TraefikBackendHealthCheckPort, "880"),
|
||||
|
@ -546,6 +547,9 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
CircuitBreaker: &types.CircuitBreaker{
|
||||
Expression: "NetworkErrorRatio() > 0.5",
|
||||
},
|
||||
ResponseForwarding: &types.ResponseForwarding{
|
||||
FlushInterval: "10ms",
|
||||
},
|
||||
LoadBalancer: &types.LoadBalancer{
|
||||
Method: "drr",
|
||||
Stickiness: &types.Stickiness{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue