core

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOSAttributes

func ApplyOSAttributes(cmd *exec.Cmd)

ApplyOSAttributes applies OS-specific attributes to the given command. On Linux, this ensures Pdeathsig is set to SIGKILL to prevent zombie processes.

func DefaultNamespaceCloneFlags

func DefaultNamespaceCloneFlags() uintptr

Types

type SandboxConfig

type SandboxConfig struct {
	MemoryMaxBytes int64
	CpuMaxMicros   int64
	PidsMax        int64
	CloneFlags     uintptr
}

SandboxConfig contains per-worker sandbox resource constraints. A value of 0 means "unlimited" for memory and CPU.

type SandboxHandle

type SandboxHandle interface {
	PostStart()
	Cleanup()
}

SandboxHandle owns post-start and cleanup hooks for sandbox resources. Implementations may be no-op on unsupported or soft-fail paths.

func ApplySandboxFlags

func ApplySandboxFlags(cmd *exec.Cmd, workerID string, cfg SandboxConfig) (SandboxHandle, error)

ApplySandboxFlags applies Linux cgroup v2 constraints to the command. If cgroup provisioning is unavailable (for example due to permissions), it soft-fails and allows the worker to start without constraints.

Jump to

Keyboard shortcuts

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