From 24e7b86a87e618202a2983c716f43dd9e9eeb552 Mon Sep 17 00:00:00 2001 From: Steve Powell Date: Mon, 1 Sep 2014 00:32:01 -0700 Subject: [PATCH] Remove erroneous reference to `path` in description and error list; add format description for `id` string; add "invalid format" error for `id` string; remove initial capitals on references to parameter names; remove reference to `initialConfig`; add description of id checking. Signed-off-by: Steve Powell --- factory.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/factory.go b/factory.go index b74493359..f4c31160c 100644 --- a/factory.go +++ b/factory.go @@ -1,14 +1,20 @@ package libcontainer type Factory interface { - // Creates a new container in the given path. A unique ID is generated for the container and - // starts the initial process inside the container. + + // Creates a new container with the given id and starts the initial process inside it. + // id must be a string containing only letters, digits and underscores and must contain + // between 1 and 1024 characters, inclusive. + // + // The id must not already be in use by an existing container. Containers created using + // a factory with the same path (and file system) must have distinct ids. // // Returns the new container with a running process. // // Errors: - // Path already exists - // Config or initialConfig is invalid + // id is already in use by a container + // id has incorrect format + // config is invalid // System error // // On error, any partially created container parts are cleaned up (the operation is atomic).