From 957a5104b8777cacb1b086350524b0c983efa4e8 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Mon, 3 Dec 2018 12:42:38 -0800 Subject: [PATCH] Uses a proxy interface instead --- docker/client.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/client.go b/docker/client.go index e3b134c1e62..f71aadce55b 100644 --- a/docker/client.go +++ b/docker/client.go @@ -14,7 +14,13 @@ import ( ) type dockerClient struct { - cli *client.Client + cli dockerProxy +} + +type dockerProxy interface { + ContainerList(context.Context, types.ContainerListOptions) ([]types.Container, error) + ContainerLogs(context.Context, string, types.ContainerLogsOptions) (io.ReadCloser, error) + Events(context.Context, types.EventsOptions) (<-chan events.Message, <-chan error) } // Client is a proxy around the docker client