Documentation
¶
Overview ¶
Package isolation owns the executor's local compiler and guest processes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
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 Supervisor ¶
type Supervisor struct{}
func New ¶
func New(c Config) (*Supervisor, error)
func (*Supervisor) Close ¶
func (*Supervisor) Close() error
func (*Supervisor) Config ¶
func (*Supervisor) Config() Config
Click to show internal directories.
Click to hide internal directories.