Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Namespace ¶
type Namespace interface { // Priority returns the priority of the namespace, which is used for sorting // namespaces in the From function. Namespaces with higher priorities are // processed earlier. Priority() int // Type returns the OCI LinuxNamespaceType key for the namespace Type() specs.LinuxNamespaceType // CloneFlag returns the flag that should be used with the `clone` or `unshare` // syscall. This flag determines the specific namespace that will be created // or unshared during these syscalls. CloneFlag() uintptr // Finalize performs additional steps required to complete the containerization // process after the `clone` or `unshare` syscall has been executed. Finalize(spec specs.Spec) error // IsSupported checks whether the namespace is supported by the runtime. // It returns `false` if the namespace cannot be used. IsSupported() bool }
Namespace defines an interface for Linux namespaces and their containerization.
func From ¶
func From(runtime ipc.RuntimePipeWriter, spec specs.Spec) (namespaces []Namespace, err error)
From prepares a list of namespaces based on the provided spec. It takes a RuntimePipeWriter and a spec as inputs and returns a slice of Namespace and an error if any occurs. The namespaces are sorted based on their priority before being returned.
Click to show internal directories.
Click to hide internal directories.