containment

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0, MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package containment supervises out-of-process subject drivers with wall-clock timeouts, process-group termination, isolated scratch directories, output caps, and child resource telemetry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Stdout         []byte
	Stderr         []byte
	ExitCode       int
	Signal         string
	DurationNs     int64
	PeakRSSBytes   int64
	TimedOut       bool
	OOMKilled      bool
	Crashed        bool
	OutputExceeded bool
}

Result captures the outcome and telemetry of a contained subprocess execution.

func Run

func Run(ctx context.Context, spec Spec) (*Result, error)

Run executes spec inside an isolated temporary directory with timeout and resource supervision.

type Spec

type Spec struct {
	Command        string
	Args           []string
	Stdin          []byte
	Timeout        time.Duration
	MaxRSSBytes    int64
	MaxOutputBytes int64
	ExtraEnv       []string
}

Spec configures a single contained subprocess execution.

Jump to

Keyboard shortcuts

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