Request buffering middleware
This commit is contained in:
parent
d426126a92
commit
a81171d5f1
44 changed files with 2155 additions and 5 deletions
|
|
@ -40,6 +40,7 @@ func (p *Provider) buildConfiguration(catalog []catalogUpdate) *types.Configurat
|
|||
"getLoadBalancer": p.getLoadBalancer,
|
||||
"getMaxConn": p.getMaxConn,
|
||||
"getHealthCheck": p.getHealthCheck,
|
||||
"getBuffering": p.getBuffering,
|
||||
|
||||
// Frontend functions
|
||||
"getFrontendRule": p.getFrontendRule,
|
||||
|
|
@ -296,6 +297,20 @@ func (p *Provider) getHealthCheck(tags []string) *types.HealthCheck {
|
|||
}
|
||||
}
|
||||
|
||||
func (p *Provider) getBuffering(tags []string) *types.Buffering {
|
||||
if !p.hasAttributePrefix(label.SuffixBackendBuffering, tags) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &types.Buffering{
|
||||
MaxRequestBodyBytes: p.getInt64Attribute(label.SuffixBackendBufferingMaxRequestBodyBytes, tags, 0),
|
||||
MaxResponseBodyBytes: p.getInt64Attribute(label.SuffixBackendBufferingMaxResponseBodyBytes, tags, 0),
|
||||
MemRequestBodyBytes: p.getInt64Attribute(label.SuffixBackendBufferingMemRequestBodyBytes, tags, 0),
|
||||
MemResponseBodyBytes: p.getInt64Attribute(label.SuffixBackendBufferingMemResponseBodyBytes, tags, 0),
|
||||
RetryExpression: p.getAttribute(label.SuffixBackendBufferingRetryExpression, tags, ""),
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Provider) getRedirect(tags []string) *types.Redirect {
|
||||
if p.hasAttribute(label.SuffixFrontendRedirectEntryPoint, tags) {
|
||||
return &types.Redirect{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue