feat(k8s): add max conn annotations.
This commit is contained in:
parent
1c495d7ea4
commit
53388a3570
4 changed files with 79 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue