Skip to content

Commit

Permalink
Merge pull request openshift#76 from vmarmol/api-init
Browse files Browse the repository at this point in the history
Adding Initialize() to create a new container.
  • Loading branch information
vmarmol committed Jul 9, 2014
2 parents ff8b888 + c90a2c5 commit 46e34cf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions factory.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package libcontainer

type Factory interface {
// Initializes a new container with the specified ID and config. The ID is a user-provided
// opaque identifier. Starts an init process with the initialProcess config inside the new
// container.
//
// Returns the new container and the PID of the new init inside the container.
// The caller must reap this PID.
//
// Errors: ID already exists,
// config or initialConfig is invalid,
// system error.
//
// On error, any partially created container parts are cleaned up (the operation is atomic).
Initialize(id string, config *Config, initialProcess *ProcessConfig) (*Container, int, error)
}

0 comments on commit 46e34cf

Please sign in to comment.