runservice executor: remove unused CopyTo method from driver
This commit is contained in:
parent
f85ffb594f
commit
17f3dc89f2
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue