Versions in this module Expand all Collapse all v1 v1.2.0 May 19, 2024 v1.1.12 May 17, 2024 Changes in this version + var ErrCgroup2NsdelegateOptionUsed = errors.New("cgroup2 nsdelegate mount option conflicts with cgroup path in spec") v1.1.11 May 13, 2024 v1.1.10 May 10, 2024 v1.1.9 May 6, 2024 Changes in this version + var ErrContainerNotFound = errors.New("container not found") v1.1.8 Mar 7, 2024 v1.1.7 Feb 28, 2024 v1.1.6 Feb 23, 2024 v1.1.5 Feb 19, 2024 v1.1.4 Dec 20, 2023 v1.1.3 Dec 7, 2023 v1.1.2 Dec 7, 2023 v1.1.1 Dec 5, 2023 v1.1.0 Dec 5, 2023 Changes in this version + func NamespacesExists(ctx context.Context, namespaces []LinuxNamespace, ...) error + func RefreshNamespace(ctx context.Context, ns *LinuxNamespace) + func RefreshNamespaces(ctx context.Context, namespaces []LinuxNamespace, ...) + func RootCommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd + type BackgroundState struct + func RunBundleInBackground(ctx context.Context, runc Runc, bundle ContainerBundle) (*BackgroundState, error) + func (r *BackgroundState) Exited() (bool, error) + func (r *BackgroundState) Wait() + type Config struct + Debug bool + NsmountPath string + Root string + Rootless string + SystemdCgroup bool + func ConfigFromEnvironment() Config + type ContainerBundle interface + ContainerId func() string + CopyFileFromProcess func(ctx context.Context, pid int, fromPath, toPath string) error + EditSpec func(ctx context.Context, editors ...SpecEditor) error + MountFromProcess func(ctx context.Context, fromPid int, fromPath, mountpoint string) error + Path func() string + Remove func() error + type ContainerState struct + Annotations map[string]string + Bundle string + Created time.Time + ID string + Pid int + Rootfs string + Status string + type IoOpts struct + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + func (o IoOpts) WithStdin(reader io.Reader) IoOpts + type LinuxNamespace struct + Inode uint64 + Path string + Type specs.LinuxNamespaceType + func FilterNamespaces(ns []LinuxNamespace, types ...specs.LinuxNamespaceType) []LinuxNamespace + type LinuxProcessInfo struct + CGroupPath string + Namespaces []LinuxNamespace + Pid int + func ReadLinuxProcessInfo(ctx context.Context, pid int) (LinuxProcessInfo, error) + type Runc interface + Create func(ctx context.Context, image, id string) (ContainerBundle, error) + Delete func(ctx context.Context, id string, force bool) error + Kill func(background context.Context, id string, signal syscall.Signal) error + Run func(ctx context.Context, container ContainerBundle, ioOpts IoOpts) error + RunCommand func(ctx context.Context, container ContainerBundle) (*exec.Cmd, error) + State func(ctx context.Context, id string) (*ContainerState, error) + func NewRunc(cfg Config) Runc + type SpecEditor func(spec *specs.Spec) + 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 LinuxNamespace) SpecEditor + func WithNamespaces(ns []LinuxNamespace) SpecEditor + func WithProcessArgs(args ...string) SpecEditor + func WithProcessCwd(cwd string) SpecEditor