feat(k8s): add max conn annotations.

This commit is contained in:
Fernandez Ludovic 2017-12-21 22:44:06 +01:00 committed by Traefiker
parent 1c495d7ea4
commit 53388a3570
4 changed files with 79 additions and 4 deletions

View file

@ -133,6 +133,24 @@ func retrying(exp string) func(*types.Buffering) {
}
}
func maxConnExtractorFunc(exp string) func(*types.Backend) {
return func(b *types.Backend) {
if b.MaxConn == nil {
b.MaxConn = &types.MaxConn{}
}
b.MaxConn.ExtractorFunc = exp
}
}
func maxConnAmount(value int64) func(*types.Backend) {
return func(b *types.Backend) {
if b.MaxConn == nil {
b.MaxConn = &types.MaxConn{}
}
b.MaxConn.Amount = value
}
}
// Frontend
func buildFrontends(opts ...func(*types.Frontend) string) map[string]*types.Frontend {