runservice executor: remove unused CopyTo method from driver

This commit is contained in:
Simone Gotti 2019-04-22 18:27:48 +02:00
parent f85ffb594f
commit 17f3dc89f2
2 changed files with 0 additions and 22 deletions

View File

@ -355,26 +355,6 @@ func (dp *DockerPod) Remove(ctx context.Context) error {
return nil 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 { type DockerContainerExec struct {
execID string execID string
hresp *types.HijackedResponse hresp *types.HijackedResponse

View File

@ -56,8 +56,6 @@ type Pod interface {
Remove(ctx context.Context) error Remove(ctx context.Context) error
// Exec executes a command inside the first container in the Pod // Exec executes a command inside the first container in the Pod
Exec(ctx context.Context, execConfig *ExecConfig) (ContainerExec, error) 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 { type ContainerExec interface {