Add flush interval option on backend
This commit is contained in:
parent
c6dd1dccc3
commit
e6e9a86919
43 changed files with 420 additions and 85 deletions
|
@ -59,6 +59,7 @@ func (p *Provider) buildConfiguration() *types.Configuration {
|
|||
// Backend functions
|
||||
"getServers": p.getServers,
|
||||
"getCircuitBreaker": p.getCircuitBreaker,
|
||||
"getResponseForwarding": p.getResponseForwarding,
|
||||
"getLoadBalancer": p.getLoadBalancer,
|
||||
"getMaxConn": p.getMaxConn,
|
||||
"getHealthCheck": p.getHealthCheck,
|
||||
|
@ -269,6 +270,20 @@ func (p *Provider) getLoadBalancer(rootPath string) *types.LoadBalancer {
|
|||
return lb
|
||||
}
|
||||
|
||||
func (p *Provider) getResponseForwarding(rootPath string) *types.ResponseForwarding {
|
||||
if !p.has(rootPath, pathBackendResponseForwardingFlushInterval) {
|
||||
return nil
|
||||
}
|
||||
value := p.get("", rootPath, pathBackendResponseForwardingFlushInterval)
|
||||
if len(value) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &types.ResponseForwarding{
|
||||
FlushInterval: value,
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Provider) getCircuitBreaker(rootPath string) *types.CircuitBreaker {
|
||||
if !p.has(rootPath, pathBackendCircuitBreakerExpression) {
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue