Move ExecConfig to types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
David Calavera
2015-12-18 13:17:54 -05:00
parent 056e744903
commit 839f73c302
10 changed files with 32 additions and 32 deletions

View File

@@ -21,8 +21,8 @@ type apiClient interface {
ContainerCommit(options types.ContainerCommitOptions) (types.ContainerCommitResponse, error)
ContainerCreate(config *runconfig.ContainerConfigWrapper, containerName string) (types.ContainerCreateResponse, error)
ContainerDiff(containerID string) ([]types.ContainerChange, error)
ContainerExecAttach(execID string, config runconfig.ExecConfig) (types.HijackedResponse, error)
ContainerExecCreate(config runconfig.ExecConfig) (types.ContainerExecCreateResponse, error)
ContainerExecAttach(execID string, config types.ExecConfig) (types.HijackedResponse, error)
ContainerExecCreate(config types.ExecConfig) (types.ContainerExecCreateResponse, error)
ContainerExecInspect(execID string) (types.ContainerExecInspect, error)
ContainerExecResize(options types.ResizeOptions) error
ContainerExecStart(execID string, config types.ExecStartCheck) error

View File

@@ -4,11 +4,10 @@ import (
"encoding/json"
"github.com/docker/docker/api/types"
"github.com/docker/docker/runconfig"
)
// ContainerExecCreate creates a new exec configuration to run an exec process.
func (cli *Client) ContainerExecCreate(config runconfig.ExecConfig) (types.ContainerExecCreateResponse, error) {
func (cli *Client) ContainerExecCreate(config types.ExecConfig) (types.ContainerExecCreateResponse, error) {
var response types.ContainerExecCreateResponse
resp, err := cli.post("/containers/"+config.Container+"/exec", nil, config, nil)
if err != nil {
@@ -30,7 +29,7 @@ func (cli *Client) ContainerExecStart(execID string, config types.ExecStartCheck
// It returns a types.HijackedConnection with the hijacked connection
// and the a reader to get output. It's up to the called to close
// the hijacked connection by calling types.HijackedResponse.Close.
func (cli *Client) ContainerExecAttach(execID string, config runconfig.ExecConfig) (types.HijackedResponse, error) {
func (cli *Client) ContainerExecAttach(execID string, config types.ExecConfig) (types.HijackedResponse, error) {
headers := map[string][]string{"Content-Type": {"application/json"}}
return cli.postHijacked("/exec/"+execID+"/start", nil, config, headers)
}