Merge pull request #166 from crosbymichael/api-update

Update container to have an ID provided by the user
This commit is contained in:
Michael Crosby 2014-08-29 11:55:12 -07:00
commit 55430d0db7
2 changed files with 5 additions and 5 deletions

View File

@ -9,8 +9,8 @@ package libcontainer
// be destroyed by a separate process, any function may return that the container
// was not found.
type Container interface {
// Returns the path to the container which contains the state
Path() string
// Returns the ID of the container
ID() string
// Returns the current run state of the container.
//

View File

@ -12,14 +12,14 @@ type Factory interface {
// System error
//
// On error, any partially created container parts are cleaned up (the operation is atomic).
Create(path string, config *Config) (Container, error)
Create(id string, config *Config) (Container, error)
// Load takes the path for an existing container and reconstructs the container
// Load takes an ID for an existing container and reconstructs the container
// from the state.
//
// Errors:
// Path does not exist
// Container is stopped
// System error
Load(path string) (Container, error)
Load(id string) (Container, error)
}