Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeRuntimeEngineRequests ¶
ServeRuntimeEngineRequests serves runtime engine requests with corresponding registered engine methods.
Types ¶
type Engine ¶
type Engine struct {
EngineOperations
*config.Common
}
Engine is the combination of an EngineOperations and a config.Common. The singularity startup routines (src/runtime/startup/*) can spawn a container process from this type
type EngineOperations ¶
type EngineOperations interface {
// Config returns the current EngineConfig, used to populate the Common struct
Config() config.EngineConfig
// InitConfig is responsible for storing the parse config.Common inside
// the EngineOperations implementation.
InitConfig(*config.Common)
// PrepareConfig is called in stage1 to validate and prepare container configuration.
PrepareConfig(*starter.Config) error
// CreateContainer is called in master and does mount operations, etc... to
// set up the container environment for the payload proc.
CreateContainer(int, net.Conn) error
// StartProcess is called in stage2 after waiting on RPC server exit. It is
// responsible for exec'ing the payload proc in the container.
StartProcess(net.Conn) error
// PostStartProcess is called in master after successful execution of container process.
PostStartProcess(int) error
// MonitorContainer is called in master once the container proc has been spawned. It
// will typically block until the container proc exists.
MonitorContainer(int, chan os.Signal) (syscall.WaitStatus, error)
// CleanupContainer is called in master after the MontiorContainer returns. It is responsible
// for ensuring that the container has been properly torn down.
CleanupContainer(error, syscall.WaitStatus) error
}
EngineOperations is an interface describing necessary operations to launch a container process.
Click to show internal directories.
Click to hide internal directories.