Documentation

Index

Constants

This section is empty.

Variables

View Source
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}
	CgroupNamespace  = specs.LinuxNamespace{Type: specs.CgroupNamespace}
)

Functions

func Process

func Process(args ...string) specs.Process

    Process returns an OCI Process struct with the given args.

    Types

    type Bndl

    type Bndl struct {
    	Spec specs.Spec
    }

      Bndl represents an in-memory OCI bundle

      func Bundle

      func Bundle() Bndl

        Bundle creates a Bndl

        func (Bndl) CGroupPath

        func (b Bndl) CGroupPath() string

        func (Bndl) Capabilities

        func (b Bndl) Capabilities() []string

        func (*Bndl) CloneLinux

        func (b *Bndl) CloneLinux() Bndl

        func (*Bndl) CloneProcess

        func (b *Bndl) CloneProcess() Bndl

        func (*Bndl) CloneWindows

        func (b *Bndl) CloneWindows() Bndl

        func (Bndl) Devices

        func (b Bndl) Devices() []specs.LinuxDevice

        func (Bndl) GIDMappings

        func (b Bndl) GIDMappings() []specs.LinuxIDMapping

        func (Bndl) Hostname

        func (b Bndl) Hostname() string

        func (Bndl) MaskedPaths

        func (b Bndl) MaskedPaths() []string

        func (Bndl) Mounts

        func (b Bndl) Mounts() []specs.Mount

        func (Bndl) Namespaces

        func (b Bndl) Namespaces() []specs.LinuxNamespace

        func (Bndl) PoststopHooks

        func (b Bndl) PoststopHooks() []specs.Hook

        func (Bndl) PrestartHooks

        func (b Bndl) PrestartHooks() []specs.Hook

        func (Bndl) Process

        func (b Bndl) Process() specs.Process

        func (Bndl) Resources

        func (b Bndl) Resources() *specs.LinuxResources

        func (Bndl) RootFS

        func (b Bndl) RootFS() string

          RootFS returns the path to the rootfs of this bundle. Nothing is modified

          func (Bndl) RootFSPropagation

          func (b Bndl) RootFSPropagation() string

          func (Bndl) UIDMappings

          func (b Bndl) UIDMappings() []specs.LinuxIDMapping

          func (Bndl) WindowsResources

          func (b Bndl) WindowsResources() *specs.WindowsResources

          func (Bndl) WithApparmorProfile

          func (b Bndl) WithApparmorProfile(profile string) Bndl

          func (Bndl) WithBlockIO

          func (b Bndl) WithBlockIO(blockIO specs.LinuxBlockIO) Bndl

          func (Bndl) WithCGroupPath

          func (b Bndl) WithCGroupPath(path string) Bndl

          func (Bndl) WithCPUShares

          func (b Bndl) WithCPUShares(shares specs.LinuxCPU) Bndl

          func (Bndl) WithCapabilities

          func (b Bndl) WithCapabilities(capabilities ...string) Bndl

            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 (b Bndl) WithHostname(hostname string) Bndl

              func (Bndl) WithMaskedPaths

              func (b Bndl) WithMaskedPaths(maskedPaths []string) Bndl

              func (Bndl) WithMemoryLimit

              func (b Bndl) WithMemoryLimit(limit specs.LinuxMemory) Bndl

              func (Bndl) WithMounts

              func (b Bndl) WithMounts(mounts ...specs.Mount) Bndl

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

                    func (b Bndl) WithPidLimit(limit specs.LinuxPids) Bndl

                    func (Bndl) WithPoststopHooks

                    func (b Bndl) WithPoststopHooks(hook ...specs.Hook) Bndl

                    func (Bndl) WithPrependedMounts

                    func (b Bndl) WithPrependedMounts(mounts ...specs.Mount) Bndl

                      WithPrependedMounts returns a bundle with the given mounts prepended. The original bundle is not modified.

                      func (Bndl) WithPrestartHooks

                      func (b Bndl) WithPrestartHooks(hook ...specs.Hook) Bndl

                      func (Bndl) WithProcess

                      func (b Bndl) WithProcess(process specs.Process) Bndl

                        WithProcess returns a bundle with the process replaced with the given Process. The original bundle is not modified.

                        func (Bndl) WithRootFS

                        func (b Bndl) WithRootFS(absolutePath string) Bndl

                        func (Bndl) WithRootFSPropagation

                        func (b Bndl) WithRootFSPropagation(rootfsPropagation string) Bndl

                        func (Bndl) WithUIDMappings

                        func (b Bndl) WithUIDMappings(mappings ...specs.LinuxIDMapping) Bndl

                        func (Bndl) WithWindows

                        func (b Bndl) WithWindows(windows specs.Windows) 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 {
                        }

                        func (*BndlLoader) Load

                        func (b *BndlLoader) Load(path string) (Bndl, error)

                        type BundleSaver

                        type BundleSaver struct{}

                        func (BundleSaver) Save

                        func (b BundleSaver) Save(bundle Bndl, path string) error

                        type NamespaceSlice

                        type NamespaceSlice []specs.LinuxNamespace

                        func (NamespaceSlice) Set

                        type RuncBinary

                        type RuncBinary struct {
                        	Path string
                        	Root string
                        }

                          RuncBinary is the path to a runc binary.

                          func (RuncBinary) DeleteCommand

                          func (runc RuncBinary) DeleteCommand(id string, force bool, logFile string) *exec.Cmd

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

                                func (runc RuncBinary) RunCommand(bundlePath, pidfilePath, logfilePath, id string, extraGlobalArgs []string) *exec.Cmd

                                func (RuncBinary) StartCommand

                                func (runc RuncBinary) StartCommand(path, id string, detach bool, log string) *exec.Cmd

                                  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.