From d6348aec6c9bde41efa743baf45a4963f7e1ef53 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 26 Aug 2014 08:18:13 -0700 Subject: [PATCH] Update container to have ID provided by the user Signed-off-by: Michael Crosby --- container.go | 4 ++-- factory.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/container.go b/container.go index c4d372ce..ace997b7 100644 --- a/container.go +++ b/container.go @@ -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. // diff --git a/factory.go b/factory.go index 9161ff05..b7449335 100644 --- a/factory.go +++ b/factory.go @@ -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) }