Documentation ¶
Overview ¶
Package runtime defines the interface between the GCS and an OCI container runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerProcessState ¶
ContainerProcessState gives information about a process created by a Runtime.
type ContainerState ¶
type ContainerState struct { OCIVersion string ID string Pid int BundlePath string RootfsPath string Status string Created string }
ContainerState gives information about a container created by a Runtime.
type Runtime ¶
type Runtime interface { CreateContainer(id string, bundlePath string, stdioOptions StdioOptions) (pid int, err error) StartContainer(id string) error ExecProcess(id string, process oci.Process, stdioOptions StdioOptions) (pid int, err error) KillContainer(id string, signal oslayer.Signal) error DeleteContainer(id string) error DeleteProcess(id string, pid int) error PauseContainer(id string) error ResumeContainer(id string) error GetContainerState(id string) (*ContainerState, error) ContainerExists(id string) (bool, error) ListContainerStates() ([]ContainerState, error) GetRunningContainerProcesses(id string) ([]ContainerProcessState, error) GetAllContainerProcesses(id string) ([]ContainerProcessState, error) WaitOnProcess(id string, pid int) (oslayer.ProcessExitState, error) WaitOnContainer(id string) (oslayer.ProcessExitState, error) GetInitPid(id string) (pid int, err error) GetStdioPipes(id string, pid int) (*StdioPipes, error) }
Runtime is the interface defining commands over an OCI container runtime, such as runC.
type StdioOptions ¶
StdioOptions specify how the runtime should handle stdio for the process.
type StdioPipes ¶
type StdioPipes struct { In io.WriteCloser Out io.ReadCloser Err io.ReadCloser }
StdioPipes contain the interfaces for reading from and writing to a process's stdio.
Directories ¶
Path | Synopsis |
---|---|
Package mockruntime defines a mock implementation of the Runtime interface.
|
Package mockruntime defines a mock implementation of the Runtime interface. |
Package runc defines an implementation of the Runtime interface which uses runC as the container runtime.
|
Package runc defines an implementation of the Runtime interface which uses runC as the container runtime. |
Click to show internal directories.
Click to hide internal directories.