runhcs

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2019 License: MIT Imports: 12 Imported by: 0

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 added in v0.7.7

func GetErrorFromPipe(pipe io.Reader, p *os.Process) error

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 added in v0.7.7

func IssueVMRequest(pipepath string, req *VMRequest) error

IssueVMRequest issues a request to a shim at the given pipe.

func SafePipePath added in v0.7.7

func SafePipePath(name string) string

func VMPipePath added in v0.7.7

func VMPipePath(hostUniqueID guid.GUID) string

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 added in v0.7.7

type VMRequest struct {
	ID string
	Op VMRequestOp
}

VMRequest is an operation request that is issued to a VM shim.

type VMRequestOp added in v0.7.7

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL