Skip to content

Commit

Permalink
Use conventional factory terminology
Browse files Browse the repository at this point in the history
The Initialize method is responsible for creating a new Container instance
and calling it Create makes the factory pattern more obvious. Clearly
creating a Container instance involves initialising the instance.

Docker-DCO-1.1-Signed-off-by: Glyn Normington <gnormington@gopivotal.com> (github: glyn)
  • Loading branch information
Glyn Normington committed Jul 10, 2014
1 parent ca2de1b commit b42d0cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions factory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package libcontainer

type Factory interface {
// Initializes a new container in the given path. A unique ID is generated for the container and
// Creates a new container in the given path. A unique ID is generated for the container and
// starts the initial process inside the container.
//
// Returns the new container with a running process.
Expand All @@ -12,7 +12,7 @@ type Factory interface {
// System error
//
// On error, any partially created container parts are cleaned up (the operation is atomic).
Initialize(path string, config *Config) (Container, error)
Create(path string, config *Config) (Container, error)

// Load takes the path for an existing container and reconstructs the container
// from the state.
Expand Down

0 comments on commit b42d0cb

Please sign in to comment.