From 17f3dc89f2c195c95266a63c9e894f2699c6b284 Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Mon, 22 Apr 2019 18:27:48 +0200 Subject: [PATCH] runservice executor: remove unused CopyTo method from driver --- .../runservice/executor/driver/docker.go | 20 ------------------- .../runservice/executor/driver/driver.go | 2 -- 2 files changed, 22 deletions(-) diff --git a/internal/services/runservice/executor/driver/docker.go b/internal/services/runservice/executor/driver/docker.go index 14d41cf..7650cef 100644 --- a/internal/services/runservice/executor/driver/docker.go +++ b/internal/services/runservice/executor/driver/docker.go @@ -355,26 +355,6 @@ func (dp *DockerPod) Remove(ctx context.Context) error { return nil } -func (dp *DockerPod) CopyTo(ctx context.Context, srcPath, dstPath string) error { - srcInfo, err := archive.CopyInfoSourcePath(srcPath, false) - if err != nil { - return err - } - - srcArchive, err := archive.TarResource(srcInfo) - if err != nil { - return err - } - defer srcArchive.Close() - - options := types.CopyToContainerOptions{ - AllowOverwriteDirWithFile: false, - CopyUIDGID: false, - } - - return dp.client.CopyToContainer(ctx, dp.containers[0].ID, dstPath, srcArchive, options) -} - type DockerContainerExec struct { execID string hresp *types.HijackedResponse diff --git a/internal/services/runservice/executor/driver/driver.go b/internal/services/runservice/executor/driver/driver.go index a6693c4..c43c771 100644 --- a/internal/services/runservice/executor/driver/driver.go +++ b/internal/services/runservice/executor/driver/driver.go @@ -56,8 +56,6 @@ type Pod interface { Remove(ctx context.Context) error // Exec executes a command inside the first container in the Pod Exec(ctx context.Context, execConfig *ExecConfig) (ContainerExec, error) - // CopyTo copies srcPath inside dstPath of the first container in the Pod - CopyTo(ctx context.Context, srcPath, dstPath string) error } type ContainerExec interface {