4 "github.com/opencontainers/runc/libcontainer/configs"
7 type Factory interface {
8 // Creates a new container with the given id and starts the initial process inside it.
9 // id must be a string containing only letters, digits and underscores and must contain
10 // between 1 and 1024 characters, inclusive.
12 // The id must not already be in use by an existing container. Containers created using
13 // a factory with the same path (and filesystem) must have distinct ids.
15 // Returns the new container with a running process.
18 // IdInUse - id is already in use by a container
19 // InvalidIdFormat - id has incorrect format
20 // ConfigInvalid - config is invalid
21 // Systemerror - System error
23 // On error, any partially created container parts are cleaned up (the operation is atomic).
24 Create(id string, config *configs.Config) (Container, error)
26 // Load takes an ID for an existing container and returns the container information
27 // from the state. This presents a read only view of the container.
30 // Path does not exist
32 Load(id string) (Container, error)
34 // StartInitialization is an internal API to libcontainer used during the reexec of the
38 // Pipe connection error
40 StartInitialization() error
42 // Type returns info string about factory type (e.g. lxc, libcontainer...)