1
0
Fork 0

feat: add in flight connection middleware

This commit is contained in:
Tom Moulard 2021-11-29 17:12:06 +01:00 committed by GitHub
parent 95fabeae73
commit 93de7cf0c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 326 additions and 4 deletions

View file

@ -174,6 +174,7 @@ func TestDecodeConfiguration(t *testing.T) {
"traefik.http.services.Service1.loadbalancer.sticky.cookie.name": "fui",
"traefik.tcp.middlewares.Middleware0.ipwhitelist.sourcerange": "foobar, fiibar",
"traefik.tcp.middlewares.Middleware2.inflightconn.amount": "42",
"traefik.tcp.routers.Router0.rule": "foobar",
"traefik.tcp.routers.Router0.entrypoints": "foobar, fiibar",
"traefik.tcp.routers.Router0.service": "foobar",
@ -236,6 +237,11 @@ func TestDecodeConfiguration(t *testing.T) {
SourceRange: []string{"foobar", "fiibar"},
},
},
"Middleware2": {
InFlightConn: &dynamic.TCPInFlightConn{
Amount: 42,
},
},
},
Services: map[string]*dynamic.TCPService{
"Service0": {
@ -719,6 +725,11 @@ func TestEncodeConfiguration(t *testing.T) {
SourceRange: []string{"foobar", "fiibar"},
},
},
"Middleware2": {
InFlightConn: &dynamic.TCPInFlightConn{
Amount: 42,
},
},
},
Services: map[string]*dynamic.TCPService{
"Service0": {
@ -1320,6 +1331,7 @@ func TestEncodeConfiguration(t *testing.T) {
"traefik.HTTP.Services.Service0.LoadBalancer.HealthCheck.Headers.name0": "foobar",
"traefik.TCP.Middlewares.Middleware0.IPWhiteList.SourceRange": "foobar, fiibar",
"traefik.TCP.Middlewares.Middleware2.InFlightConn.Amount": "42",
"traefik.TCP.Routers.Router0.Rule": "foobar",
"traefik.TCP.Routers.Router0.EntryPoints": "foobar, fiibar",
"traefik.TCP.Routers.Router0.Service": "foobar",