Introduce StubProxy() so weaveutil can call functions on it

implies change type of docker client to weavedocker

so we can call things like Info() on it
This commit is contained in:
Bryan Boreham committed 2017-05-12 06:56:52 +00:00
1 parent 1b8d115b63
commit 0a2521e7a4
2 files changed
+19 -10

No files matched your search

+2 -1
View File
@@ -13,6 +13,7 @@ import (
"github.com/fsouza/go-dockerclient"
"github.com/weaveworks/weave/common"
weavedocker "github.com/weaveworks/weave/common/docker"
)
var (
@@ -116,7 +117,7 @@ func marshalResponseBody(r *http.Response, body interface{}) error {
return nil
}
func inspectContainerInPath(client *docker.Client, path string) (*docker.Container, error) {
func inspectContainerInPath(client *weavedocker.Client, path string) (*docker.Container, error) {
subs := containerIDRegexp.FindStringSubmatch(path)
if subs == nil {
err := fmt.Errorf("No container id found in request with path %s", path)