daemon: container ArchivePath and ExtractToDir

The following methods will deprecate the Copy method and introduce
two new, well-behaved methods for creating a tar archive of a resource
in a container and for extracting a tar archive into a directory in a
container.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
This commit is contained in:
Josh Hawn
2015-07-21 11:20:10 -07:00
parent a74799b701
commit c32dde5baa
5 changed files with 378 additions and 43 deletions
+11
View File
@@ -1,6 +1,7 @@
package types
import (
"os"
"time"
"github.com/docker/docker/daemon/network"
@@ -127,6 +128,16 @@ type CopyConfig struct {
Resource string
}
// ContainerPathStat is used to encode the response from
// GET /containers/{name:.*}/stat-path
type ContainerPathStat struct {
Name string `json:"name"`
Path string `json:"path"`
Size int64 `json:"size"`
Mode os.FileMode `json:"mode"`
Mtime time.Time `json:"mtime"`
}
// GET "/containers/{name:.*}/top"
type ContainerProcessList struct {
Processes [][]string