Documentation ¶
Index ¶
Constants ¶
View Source
const (
SafePipePrefix = `\\.\pipe\ProtectedPrefix\Administrators\`
)
Variables ¶
View Source
var ShimSuccess = []byte{0, 'O', 'K', 0}
ShimSuccess is the byte stream returned on a successful operation.
Functions ¶
func GetErrorFromPipe ¶
GetErrorFromPipe returns reads from `pipe` and verifies if the operation returned success or error. If error converts that to an error and returns. If `p` is not nill will issue a `Kill` and `Wait` for exit.
func IssueVMRequest ¶
IssueVMRequest issues a request to a shim at the given pipe.
func SafePipePath ¶
func VMPipePath ¶
VMPipePath returns the named pipe path for the vm shim.
Types ¶
type ContainerState ¶
type ContainerState struct { // Version is the OCI version for the container Version string `json:"ociVersion"` // ID is the container ID ID string `json:"id"` // InitProcessPid is the init process id in the parent namespace InitProcessPid int `json:"pid"` // Status is the current status of the container, running, paused, ... Status string `json:"status"` // Bundle is the path on the filesystem to the bundle Bundle string `json:"bundle"` // Rootfs is a path to a directory containing the container's root filesystem. Rootfs string `json:"rootfs"` // Created is the unix timestamp for the creation time of the container in UTC Created time.Time `json:"created"` // Annotations is the user defined annotations added to the config. Annotations map[string]string `json:"annotations,omitempty"` // The owner of the state directory (the owner of the container). Owner string `json:"owner"` }
ContainerState represents the platform agnostic pieces relating to a running container's status and state
type VMRequest ¶
type VMRequest struct { ID string Op VMRequestOp }
VMRequest is an operation request that is issued to a VM shim.
type VMRequestOp ¶
type VMRequestOp string
VMRequestOp is an operation that can be issued to a VM shim.
const ( // OpCreateContainer is a create container request. OpCreateContainer VMRequestOp = "create" // OpSyncNamespace is a `cni.NamespaceTypeGuest` sync request with the UVM. OpSyncNamespace VMRequestOp = "sync" // OpUnmountContainer is a container unmount request. OpUnmountContainer VMRequestOp = "unmount" // OpUnmountContainerDiskOnly is a container unmount disk request. OpUnmountContainerDiskOnly VMRequestOp = "unmount-disk" )
Click to show internal directories.
Click to hide internal directories.