simplify interceptor structs by referencing proxy

This commit is contained in:
Matthias Radestock committed 2015-06-09 14:45:50 +01:00
1 parent 020a9ea396
commit 5c70c7c71a
4 files changed
+16 -28

No files matched your search

+3 -3
View File
@@ -87,11 +87,11 @@ func (proxy *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
var i interceptor
switch {
case containerCreateRegexp.MatchString(path):
i = &createContainerInterceptor{proxy.client, proxy.dockerBridgeIP, proxy.WithDNS, proxy.WithIPAM}
i = &createContainerInterceptor{proxy}
case containerStartRegexp.MatchString(path):
i = &startContainerInterceptor{proxy.client, proxy.WithDNS, proxy.WithIPAM}
i = &startContainerInterceptor{proxy}
case execCreateRegexp.MatchString(path):
i = &createExecInterceptor{proxy.client, proxy.WithIPAM}
i = &createExecInterceptor{proxy}
default:
i = &nullInterceptor{}
}