package runhcs
import "github.com/Microsoft/hcsshim/cmd/go-runhcs"
Index ¶
- type CreateOpts
- type DeleteOpts
- type ExecOpts
- type Format
- type Runhcs
- func (r *Runhcs) Create(context context.Context, id, bundle string, opts *CreateOpts) 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) Start(context context.Context, id string) error
Types ¶
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 for the launched shim process. ShimLog string // VMLog is the path to the log file 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 for the launched shim process. ShimLog string }
ExecOpts is set of options that can be used with the Exec command.
type Format ¶
type Format string
Format is the type of log formatting options available.
const ( // Text is the default text log ouput. Text Format = "text" // JSON is the JSON formatted log output. JSON Format = "json" )
type Runhcs ¶
type Runhcs struct { // Debug enables debug output for logging. Debug bool // Log sets the log file path 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) 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) Start ¶
Start will start an already created container.
Source Files ¶
runhcs.go runhcs_create.go runhcs_delete.go runhcs_exec.go runhcs_kill.go runhcs_start.go
- Version
- v0.7.2
- Published
- Sep 6, 2018
- Platform
- darwin/amd64
- Imports
- 8 packages
- Last checked
- 17 minutes ago –
Tools for package owners.