New static configuration loading system.

Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
Ludovic Fernandez 2019-06-17 11:48:05 +02:00 committed by Traefiker Bot
parent d18edd6f77
commit 8d7eccad5d
165 changed files with 10894 additions and 6076 deletions

View file

@ -10,9 +10,9 @@ import (
"net/url"
"time"
"github.com/containous/flaeg/parse"
"github.com/containous/traefik/pkg/config"
"github.com/containous/traefik/pkg/log"
"github.com/containous/traefik/pkg/types"
)
// StatusClientClosedRequest non-standard HTTP status code for client disconnection
@ -22,7 +22,7 @@ const StatusClientClosedRequest = 499
const StatusClientClosedRequestText = "Client Closed Request"
func buildProxy(passHostHeader bool, responseForwarding *config.ResponseForwarding, defaultRoundTripper http.RoundTripper, bufferPool httputil.BufferPool, responseModifier func(*http.Response) error) (http.Handler, error) {
var flushInterval parse.Duration
var flushInterval types.Duration
if responseForwarding != nil {
err := flushInterval.Set(responseForwarding.FlushInterval)
if err != nil {
@ -30,7 +30,7 @@ func buildProxy(passHostHeader bool, responseForwarding *config.ResponseForwardi
}
}
if flushInterval == 0 {
flushInterval = parse.Duration(100 * time.Millisecond)
flushInterval = types.Duration(100 * time.Millisecond)
}
proxy := &httputil.ReverseProxy{