Documentation ¶
Index ¶
- Variables
- func DeleteCommand(id string, force bool, logFile string) *exec.Cmd
- func EventsCommand(id string) *exec.Cmd
- func ExecCommand(id, processJSONPath, pidFilePath string) *exec.Cmd
- func KillCommand(id, signal, logFile string) *exec.Cmd
- func Process(args ...string) specs.Process
- func StartCommand(path, id string, detach bool, log string) *exec.Cmd
- func StateCommand(id, logFile string) *exec.Cmd
- func StatsCommand(id, logFile string) *exec.Cmd
- type Bndl
- func (b Bndl) CGroupPath() string
- func (b Bndl) Capabilities() []string
- func (b *Bndl) CloneLinux() Bndl
- func (b *Bndl) CloneProcess() Bndl
- func (b *Bndl) CloneWindows() Bndl
- func (b Bndl) Devices() []specs.LinuxDevice
- func (b Bndl) GIDMappings() []specs.LinuxIDMapping
- func (b Bndl) Hostname() string
- func (b Bndl) MaskedPaths() []string
- func (b Bndl) Mounts() []specs.Mount
- func (b Bndl) Namespaces() []specs.LinuxNamespace
- func (b Bndl) PoststopHooks() []specs.Hook
- func (b Bndl) PrestartHooks() []specs.Hook
- func (b Bndl) Process() specs.Process
- func (b Bndl) Resources() *specs.LinuxResources
- func (b Bndl) RootFS() string
- func (b Bndl) RootFSPropagation() string
- func (b Bndl) UIDMappings() []specs.LinuxIDMapping
- func (b Bndl) WindowsResources() *specs.WindowsResources
- func (b Bndl) WithApparmorProfile(profile string) Bndl
- func (b Bndl) WithBlockIO(blockIO specs.LinuxBlockIO) Bndl
- func (b Bndl) WithCGroupPath(path string) Bndl
- func (b Bndl) WithCPUShares(shares specs.LinuxCPU) Bndl
- func (b Bndl) WithCapabilities(capabilities ...string) Bndl
- func (b Bndl) WithDeviceRestrictions(deviceRestrictions []specs.LinuxDeviceCgroup) Bndl
- func (b Bndl) WithDevices(devices ...specs.LinuxDevice) Bndl
- func (b Bndl) WithGIDMappings(mappings ...specs.LinuxIDMapping) Bndl
- func (b Bndl) WithHostname(hostname string) Bndl
- func (b Bndl) WithMaskedPaths(maskedPaths []string) Bndl
- func (b Bndl) WithMemoryLimit(limit specs.LinuxMemory) Bndl
- func (b Bndl) WithMounts(mounts ...specs.Mount) Bndl
- func (b Bndl) WithNamespace(ns specs.LinuxNamespace) Bndl
- func (b Bndl) WithNamespaces(namespaces ...specs.LinuxNamespace) Bndl
- func (b Bndl) WithPidLimit(limit specs.LinuxPids) Bndl
- func (b Bndl) WithPoststopHooks(hook ...specs.Hook) Bndl
- func (b Bndl) WithPrependedMounts(mounts ...specs.Mount) Bndl
- func (b Bndl) WithPrestartHooks(hook ...specs.Hook) Bndl
- func (b Bndl) WithProcess(process specs.Process) Bndl
- func (b Bndl) WithRootFS(absolutePath string) Bndl
- func (b Bndl) WithRootFSPropagation(rootfsPropagation string) Bndl
- func (b Bndl) WithUIDMappings(mappings ...specs.LinuxIDMapping) Bndl
- func (b Bndl) WithWindows(windows specs.Windows) Bndl
- func (b Bndl) WithWindowsCPUShares(shares specs.WindowsCPUResources) Bndl
- func (b Bndl) WithWindowsMemoryLimit(limit specs.WindowsMemoryResources) Bndl
- type BndlLoader
- type BundleSaver
- type NamespaceSlice
- type RuncBinary
- func (runc RuncBinary) DeleteCommand(id string, force bool, logFile string) *exec.Cmd
- func (runc RuncBinary) EventsCommand(id string) *exec.Cmd
- func (runc RuncBinary) ExecCommand(id, processJSONPath, pidFilePath string) *exec.Cmd
- func (runc RuncBinary) KillCommand(id, signal, logFile string) *exec.Cmd
- func (runc RuncBinary) StartCommand(path, id string, detach bool, log string) *exec.Cmd
- func (runc RuncBinary) StateCommand(id, logFile string) *exec.Cmd
- func (runc RuncBinary) StatsCommand(id, logFile string) *exec.Cmd
Constants ¶
This section is empty.
Variables ¶
var ( NetworkNamespace = specs.LinuxNamespace{Type: specs.NetworkNamespace} UserNamespace = specs.LinuxNamespace{Type: specs.UserNamespace} PIDNamespace = specs.LinuxNamespace{Type: specs.PIDNamespace} IPCNamespace = specs.LinuxNamespace{Type: specs.IPCNamespace} UTSNamespace = specs.LinuxNamespace{Type: specs.UTSNamespace} MountNamespace = specs.LinuxNamespace{Type: specs.MountNamespace} )
var DefaultRuncBinary = RuncBinary{Path: "runc"}
The DefaultRuncBinary, i.e. 'runc'.
Functions ¶
func DeleteCommand ¶
DeleteCommand creates a command that deletes a container using the default runc binary name.
func EventsCommand ¶
func ExecCommand ¶
ExecCommand creates an exec command using the default runc binary name.
func KillCommand ¶
KillCommand creates a kill command using the default runc binary name.
func StartCommand ¶
StartCommand creates a start command using the default runc binary name.
func StateCommand ¶
func StatsCommand ¶
StatsCommands creates a command that gets the stats of a container using the default runc binary name.
Types ¶
type Bndl ¶
Bndl represents an in-memory OCI bundle
func (Bndl) CGroupPath ¶
func (Bndl) Capabilities ¶
func (*Bndl) CloneLinux ¶
func (*Bndl) CloneProcess ¶
func (*Bndl) CloneWindows ¶
func (Bndl) Devices ¶
func (b Bndl) Devices() []specs.LinuxDevice
func (Bndl) GIDMappings ¶
func (b Bndl) GIDMappings() []specs.LinuxIDMapping
func (Bndl) MaskedPaths ¶
func (Bndl) Namespaces ¶
func (b Bndl) Namespaces() []specs.LinuxNamespace
func (Bndl) PoststopHooks ¶
func (Bndl) PrestartHooks ¶
func (Bndl) Resources ¶
func (b Bndl) Resources() *specs.LinuxResources
func (Bndl) RootFS ¶
GetRootfsPath returns the path to the rootfs of this bundle. Nothing is modified
func (Bndl) RootFSPropagation ¶
func (Bndl) UIDMappings ¶
func (b Bndl) UIDMappings() []specs.LinuxIDMapping
func (Bndl) WindowsResources ¶
func (b Bndl) WindowsResources() *specs.WindowsResources
func (Bndl) WithApparmorProfile ¶
func (Bndl) WithBlockIO ¶
func (b Bndl) WithBlockIO(blockIO specs.LinuxBlockIO) Bndl
func (Bndl) WithCGroupPath ¶
func (Bndl) WithCapabilities ¶
WithCapabilities returns a bundle with the given capabilities added. The original bundle is not modified.
func (Bndl) WithDeviceRestrictions ¶
func (b Bndl) WithDeviceRestrictions(deviceRestrictions []specs.LinuxDeviceCgroup) Bndl
func (Bndl) WithDevices ¶
func (b Bndl) WithDevices(devices ...specs.LinuxDevice) Bndl
WithDevices returns a bundle with the given devices added. The original bundle is not modified.
func (Bndl) WithGIDMappings ¶
func (b Bndl) WithGIDMappings(mappings ...specs.LinuxIDMapping) Bndl
func (Bndl) WithHostname ¶
func (Bndl) WithMaskedPaths ¶
func (Bndl) WithMemoryLimit ¶
func (b Bndl) WithMemoryLimit(limit specs.LinuxMemory) Bndl
func (Bndl) WithMounts ¶
WithMounts returns a bundle with the given mounts appended. The original bundle is not modified.
func (Bndl) WithNamespace ¶
func (b Bndl) WithNamespace(ns specs.LinuxNamespace) Bndl
WithNamespace returns a bundle with the given namespace in the list of namespaces. The bundle is not modified, but any existing namespace of this type will be replaced.
func (Bndl) WithNamespaces ¶
func (b Bndl) WithNamespaces(namespaces ...specs.LinuxNamespace) Bndl
WithNamespaces returns a bundle with the given namespaces. The original bundle is not modified, but the original set of namespaces is replaced in the returned bundle.
func (Bndl) WithPrependedMounts ¶
WithPrependedMounts returns a bundle with the given mounts prepended. The original bundle is not modified.
func (Bndl) WithProcess ¶
WithProcess returns a bundle with the process replaced with the given Process. The original bundle is not modified.
func (Bndl) WithRootFS ¶
func (Bndl) WithRootFSPropagation ¶
func (Bndl) WithUIDMappings ¶
func (b Bndl) WithUIDMappings(mappings ...specs.LinuxIDMapping) Bndl
func (Bndl) WithWindowsCPUShares ¶
func (b Bndl) WithWindowsCPUShares(shares specs.WindowsCPUResources) Bndl
func (Bndl) WithWindowsMemoryLimit ¶
func (b Bndl) WithWindowsMemoryLimit(limit specs.WindowsMemoryResources) Bndl
type BndlLoader ¶
type BndlLoader struct { }
type BundleSaver ¶
type BundleSaver struct{}
type NamespaceSlice ¶
type NamespaceSlice []specs.LinuxNamespace
func (NamespaceSlice) Set ¶
func (slice NamespaceSlice) Set(ns specs.LinuxNamespace) NamespaceSlice
type RuncBinary ¶
type RuncBinary struct {
Path string
}
RuncBinary is the path to a runc binary.
func (RuncBinary) DeleteCommand ¶
DeleteCommand returns an *exec.Cmd that, when run, will signal the running container.
func (RuncBinary) EventsCommand ¶
func (runc RuncBinary) EventsCommand(id string) *exec.Cmd
EventsCommand returns an *exec.Cmd that, when run, will retrieve events for the container
func (RuncBinary) ExecCommand ¶
func (runc RuncBinary) ExecCommand(id, processJSONPath, pidFilePath string) *exec.Cmd
ExecCommand returns an *exec.Cmd that, when run, will execute a process spec in a running container.
func (RuncBinary) KillCommand ¶
func (runc RuncBinary) KillCommand(id, signal, logFile string) *exec.Cmd
KillCommand returns an *exec.Cmd that, when run, will signal the running container.
func (RuncBinary) StartCommand ¶
StartCommand returns an *exec.Cmd that, when run, will execute a given bundle.
func (RuncBinary) StateCommand ¶
func (runc RuncBinary) StateCommand(id, logFile string) *exec.Cmd
StateCommand returns an *exec.Cmd that, when run, will get the state of the container.
func (RuncBinary) StatsCommand ¶
func (runc RuncBinary) StatsCommand(id, logFile string) *exec.Cmd
StatsCommand returns an *exec.Cmd that, when run, will get the stats of the container.