Documentation ¶
Index ¶
- type ContainerState
- type CreateOpts
- type DeleteOpts
- type ExecOpts
- type Format
- type ResizeTTYOpts
- type Runhcs
- func (r *Runhcs) Create(context context.Context, id, bundle string, opts *CreateOpts) error
- func (r *Runhcs) CreateScratch(context context.Context, destpath string) error
- func (r *Runhcs) Delete(context context.Context, id string, opts *DeleteOpts) error
- func (r *Runhcs) Exec(context context.Context, id, processFile string, opts *ExecOpts) error
- func (r *Runhcs) Kill(context context.Context, id, signal string) error
- func (r *Runhcs) List(context context.Context) ([]*ContainerState, error)
- func (r *Runhcs) Pause(context context.Context, id string) error
- func (r *Runhcs) Ps(context context.Context, id string) ([]int, error)
- func (r *Runhcs) ResizeTTY(context context.Context, id string, width, height uint16, opts *ResizeTTYOpts) error
- func (r *Runhcs) Resume(context context.Context, id string) error
- func (r *Runhcs) Start(context context.Context, id string) error
- func (r *Runhcs) State(context context.Context, id string) (*ContainerState, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerState ¶ added in v0.7.4
type ContainerState = irunhcs.ContainerState
ContainerState is the representation of the containers state at the moment of query.
type CreateOpts ¶
type CreateOpts struct { runc.IO // PidFile is the path to the file to write the process id to. PidFile string // ShimLog is the path to the log file or named pipe (e.g. \\.\pipe\ProtectedPrefix\Administrators\runhcs-<container-id>-shim-log) for the launched shim process. ShimLog string // VMLog is the path to the log file or named pipe (e.g. \\.\pipe\ProtectedPrefix\Administrators\runhcs-<container-id>-vm-log) for the launched VM shim process. VMLog string // VMConsole is the path to the pipe for the VM's console (e.g. \\.\pipe\debugpipe) VMConsole string }
CreateOpts is set of options that can be used with the Create command.
type DeleteOpts ¶
type DeleteOpts struct { // Force forcibly deletes the container if it is still running (uses SIGKILL). Force bool }
DeleteOpts is set of options that can be used with the Delete command.
type ExecOpts ¶
type ExecOpts struct { runc.IO // Detach from the container's process. Detach bool // PidFile is the path to the file to write the process id to. PidFile string // ShimLog is the path to the log file or named pipe (e.g. \\.\pipe\ProtectedPrefix\Administrators\runhcs-<container-id>-<exec-id>-log) for the launched shim process. ShimLog string }
ExecOpts is set of options that can be used with the Exec command.
type ResizeTTYOpts ¶ added in v0.7.4
type ResizeTTYOpts struct { // Pid is the process pid (defaults to init pid). Pid *int }
ResizeTTYOpts is set of options that can be used with the ResizeTTY command.
type Runhcs ¶
type Runhcs struct { // Debug enables debug output for logging. Debug bool // Log sets the log file path or named pipe (e.g. \\.\pipe\ProtectedPrefix\Administrators\runhcs-log) where internal debug information is written. Log string // LogFormat sets the format used by logs. LogFormat Format // Owner sets the compute system owner property. Owner string // Root is the registry key root for storage of runhcs container state. Root string }
Runhcs is the client to the runhcs cli
func (*Runhcs) Create ¶
Create creates a new container and returns its pid if it was created successfully.
func (*Runhcs) CreateScratch ¶ added in v0.7.4
CreateScratch creates a scratch vhdx at 'destpath' that is ext4 formatted.
func (*Runhcs) Delete ¶
Delete any resources held by the container often used with detached containers.
func (*Runhcs) Exec ¶
Exec executes an additional process inside the container based on the oci.Process spec found at processFile.
func (*Runhcs) Kill ¶
Kill sends the specified signal (default: SIGTERM) to the container's init process.
func (*Runhcs) List ¶ added in v0.7.4
func (r *Runhcs) List(context context.Context) ([]*ContainerState, error)
List containers started by runhcs.
Note: This is specific to the Runhcs.Root namespace provided in the global settings.
func (*Runhcs) ResizeTTY ¶ added in v0.7.4
func (r *Runhcs) ResizeTTY(context context.Context, id string, width, height uint16, opts *ResizeTTYOpts) error
ResizeTTY updates the terminal size for a container process.
func (*Runhcs) Resume ¶ added in v0.7.4
Resume resumes all processes that have been previously paused.