Update container interface with process operations

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2014-10-22 19:06:35 +00:00 committed by Victor Marmol
parent e28b636b7b
commit 6bf1e4ddfc
1 changed files with 23 additions and 1 deletions

View File

@ -50,7 +50,7 @@ type Container interface {
// ConfigInvalid - config is invalid,
// ContainerPaused - Container is paused,
// SystemError - System error.
Start(config *ProcessConfig) (pid int, exitChan chan int, err Error)
StartProcess(config *ProcessConfig) (pid int, err Error)
// Destroys the container after killing all running processes.
//
@ -79,4 +79,26 @@ type Container interface {
// ContainerDestroyed - Container no longer exists,
// SystemError - System error.
Resume() Error
// Signal sends the specified signal to a process owned by the container.
//
// Errors:
// ContainerDestroyed - Container no longer exists,
// ContainerPaused - Container is paused,
// SystemError - System error.
Signal(pid, signal int) Error
// Wait waits for the init process of the conatiner to die and returns it's exit status.
//
// Errors:
// ContainerDestroyed - Container no longer exists,
// SystemError - System error.
Wait() (exitStatus int, err Error)
// WaitProcess waits on a process owned by the container.
//
// Errors:
// ContainerDestroyed - Container no longer exists,
// SystemError - System error.
WaitProcess(pid int) (exitStatus int, err Error)
}