Documentation
¶
Overview ¶
Package isolation owns the executor's local compiler and guest processes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrCompileWorker = errors.New("compiler worker failed") ErrCompileBudget = errors.New("compilation resource budget exceeded") ErrExecutionBudget = errors.New("execution resource budget exceeded") ErrAdmission = errors.New("compiler capacity unavailable") ErrWorker = errors.New("guest worker failed") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Profile string `toml:"profile"`
CgroupRoot string `toml:"cgroup_root"`
NodeMemoryBytes int64 `toml:"node_memory_bytes"`
NodeCPUQuotaUS int64 `toml:"node_cpu_quota_us"`
NodePIDs int64 `toml:"node_pids"`
ControlMemoryReserveBytes int64 `toml:"control_memory_reserve_bytes"`
ControlCPUReserveUS int64 `toml:"control_cpu_reserve_us"`
CompileMemoryBytes int64 `toml:"compile_memory_bytes"`
CompileCPUQuotaUS int64 `toml:"compile_cpu_quota_us"`
CompileWallMS int64 `toml:"compile_wall_ms"`
CompileConcurrency int `toml:"compile_concurrency"`
CompileQueue int `toml:"compile_queue"`
RunMemoryBytes int64 `toml:"run_memory_bytes"`
RunCPUQuotaUS int64 `toml:"run_cpu_quota_us"`
RunWallMS int64 `toml:"run_wall_ms"`
WorkerPIDs int64 `toml:"worker_pids"`
MemoryPages uint32 `toml:"memory_pages"`
}
Config is explicit for the shared Linux profile. Empty/trusted keeps the local in-process engine, which does not provide hard CPU/memory isolation. CPU values are microseconds per 100ms; memory includes the Go worker itself.
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
Process is a private, single-run child. Only Close releases its reservation; caller timeout or worker exit alone cannot make capacity available again.
func (*Process) BudgetExceeded ¶
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor belongs to the node, not a reconnecting session. Reservations cover the larger phase memory limit until the process is reaped and its cgroup is removed, so aggregate pressure cannot select a healthy sibling.
func New ¶
func New(c Config) (result *Supervisor, resultErr error)
func (*Supervisor) Close ¶
func (s *Supervisor) Close() error
func (*Supervisor) Config ¶
func (s *Supervisor) Config() Config