From 8f3a8cf2dedb758757d9c6d799f59152c90e55e8 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 16 Jul 2014 18:02:29 -0700 Subject: [PATCH] Add Exec to container API Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- container.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/container.go b/container.go index 5fb2bba6..c4d372ce 100644 --- a/container.go +++ b/container.go @@ -21,6 +21,14 @@ type Container interface { // Returns the current config of the container. Config() *Config + // Start a process inside the container. Returns the PID of the new process (in the caller process's namespace) and a channel that will return the exit status of the process whenever it dies. + // + // Errors: container no longer exists, + // config is invalid, + // container is paused, + // system error. + Start(*ProcessConfig) (pid int, exitChan chan int, err error) + // Destroys the container after killing all running processes. // // Any event registrations are removed before the container is destroyed.