Update container to have ID provided by the user
Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
parent
1ecaf30408
commit
d6348aec6c
|
@ -9,8 +9,8 @@ package libcontainer
|
||||||
// be destroyed by a separate process, any function may return that the container
|
// be destroyed by a separate process, any function may return that the container
|
||||||
// was not found.
|
// was not found.
|
||||||
type Container interface {
|
type Container interface {
|
||||||
// Returns the path to the container which contains the state
|
// Returns the ID of the container
|
||||||
Path() string
|
ID() string
|
||||||
|
|
||||||
// Returns the current run state of the container.
|
// Returns the current run state of the container.
|
||||||
//
|
//
|
||||||
|
|
|
@ -12,14 +12,14 @@ type Factory interface {
|
||||||
// System error
|
// System error
|
||||||
//
|
//
|
||||||
// On error, any partially created container parts are cleaned up (the operation is atomic).
|
// 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.
|
// from the state.
|
||||||
//
|
//
|
||||||
// Errors:
|
// Errors:
|
||||||
// Path does not exist
|
// Path does not exist
|
||||||
// Container is stopped
|
// Container is stopped
|
||||||
// System error
|
// System error
|
||||||
Load(path string) (Container, error)
|
Load(id string) (Container, error)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue