Documentation
¶
Index ¶
- type ContainerBundle
- type ContainerState
- type IoOpts
- type Runc
- type SpecEditor
- func WithAnnotations(annotations map[string]string) SpecEditor
- func WithCapabilities(caps ...string) SpecEditor
- func WithCgroupPath(cgroupPath, child string) SpecEditor
- func WithHostname(hostname string) SpecEditor
- func WithMountIfNotPresent(mount specs.Mount) SpecEditor
- func WithNamespace(ns specs.LinuxNamespace) SpecEditor
- func WithNamespaces(ns []specs.LinuxNamespace) SpecEditor
- func WithProcessArgs(args ...string) SpecEditor
- func WithProcessCwd(cwd string) SpecEditor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerBundle ¶ added in v1.1.30
type ContainerBundle interface {
EditSpec(ctx context.Context, editors ...SpecEditor) error
MountFromProcess(ctx context.Context, fromPid int, fromPath, mountpoint string) error
CopyFileFromProcess(ctx context.Context, pid int, fromPath, toPath string) error
Path() string
ContainerId() string
Remove() error
}
type ContainerState ¶ added in v1.1.25
type Runc ¶
type Runc interface {
State(ctx context.Context, id string) (*ContainerState, error)
Create(ctx context.Context, image, id string) (ContainerBundle, error)
Run(ctx context.Context, container ContainerBundle, ioOpts IoOpts) error
RunCommand(ctx context.Context, container ContainerBundle) (*exec.Cmd, error)
Delete(ctx context.Context, id string, force bool) error
Kill(background context.Context, id string, signal syscall.Signal) error
}
type SpecEditor ¶
func WithAnnotations ¶
func WithAnnotations(annotations map[string]string) SpecEditor
func WithCapabilities ¶
func WithCapabilities(caps ...string) SpecEditor
func WithCgroupPath ¶
func WithCgroupPath(cgroupPath, child string) SpecEditor
func WithHostname ¶ added in v1.0.1
func WithHostname(hostname string) SpecEditor
func WithMountIfNotPresent ¶
func WithMountIfNotPresent(mount specs.Mount) SpecEditor
func WithNamespace ¶ added in v1.1.17
func WithNamespace(ns specs.LinuxNamespace) SpecEditor
func WithNamespaces ¶
func WithNamespaces(ns []specs.LinuxNamespace) SpecEditor
func WithProcessArgs ¶
func WithProcessArgs(args ...string) SpecEditor
func WithProcessCwd ¶
func WithProcessCwd(cwd string) SpecEditor
Click to show internal directories.
Click to hide internal directories.