Help us shape the future of Go! Take the 2026 Go Developer Survey

namespaces

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package namespaces implements the Linux namespaces container runner. Requires root. Uses clone(2) with CLONE_NEW* flags for full isolation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func New

func New(root string) *Runner

func (*Runner) Capabilities

func (r *Runner) Capabilities() rt.RunnerCapabilities

Capabilities returns the runner capabilities.

func (*Runner) Cleanup

func (r *Runner) Cleanup(_ context.Context, id string) error

Cleanup removes container state after exit.

func (*Runner) Create

func (r *Runner) Create(_ context.Context, cfg *rt.Config) (string, error)

Create prepares the container filesystem and config.

func (*Runner) Detect

func (r *Runner) Detect() bool

Detect checks if this runner is available on the current host.

func (*Runner) Exec

func (r *Runner) Exec(_ context.Context, _ string, cfg *rt.ExecConfig) (int, error)

Exec runs a process inside a running container.

func (*Runner) Inspect

func (r *Runner) Inspect(_ context.Context, id string) (*rt.ContainerJSON, error)

Inspect returns detailed container info.

func (*Runner) Kill

func (r *Runner) Kill(_ context.Context, id string, sig syscall.Signal) error

Kill sends an arbitrary signal to the container.

func (*Runner) Name

func (r *Runner) Name() rt.ExecutionMode

Name returns the execution mode.

func (*Runner) Pause

func (r *Runner) Pause(_ context.Context, id string) error

Pause suspends the container.

func (*Runner) Resume

func (r *Runner) Resume(_ context.Context, id string) error

Resume resumes a paused container.

func (*Runner) Start

func (r *Runner) Start(ctx context.Context, id string) (int, error)

Start launches the container process.

func (*Runner) Stats

func (r *Runner) Stats(_ context.Context, _ string) (*rt.ContainerStats, error)

Stats returns resource usage metrics.

func (*Runner) Stop

func (r *Runner) Stop(_ context.Context, id string, timeout time.Duration) error

Stop terminates the container with a signal.

func (*Runner) Wait

func (r *Runner) Wait(_ context.Context, _ string) (int, error)

Wait blocks until the container exits.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL