Documentation
¶
Index ¶
- func ApplyUserEnv(cmd *exec.Cmd, root string)
- func Configure(cfg *config.Config)
- func CurrentConfig() config.IsolationConfig
- func DefaultExposePaths(root string) []config.ExposePath
- func InstanceDirs(root string) []string
- func IsSupported() bool
- func MergeExposePaths(defaults []config.ExposePath, overrides []config.ExposePath) []config.ExposePath
- func NormalizeExposePath(item config.ExposePath) config.ExposePath
- func Preflight() error
- func PrepareCommand(cmd *exec.Cmd) error
- func PrepareInstanceRoot(root string) error
- func ResolveInstanceRoot() (string, error)
- func Run(cmd *exec.Cmd) error
- func Start(cmd *exec.Cmd) error
- func ValidateExposePaths(items []config.ExposePath) error
- type AccessRule
- type MountRule
- type UserEnv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyUserEnv ¶
ApplyUserEnv rewrites the child process environment so home, temp, and platform-specific user-data directories point into the instance root.
func Configure ¶
Configure updates the process-wide isolation state used by subsequent child process launches.
func CurrentConfig ¶
func CurrentConfig() config.IsolationConfig
CurrentConfig returns the currently active isolation settings.
func DefaultExposePaths ¶
func DefaultExposePaths(root string) []config.ExposePath
DefaultExposePaths returns the minimum built-in host paths required for the current platform to run isolated child processes.
func InstanceDirs ¶
InstanceDirs returns the directories that must exist under the instance root for isolation-aware child processes.
func IsSupported ¶
func IsSupported() bool
IsSupported reports whether the current platform has an implemented isolation backend.
func MergeExposePaths ¶
func MergeExposePaths(defaults []config.ExposePath, overrides []config.ExposePath) []config.ExposePath
MergeExposePaths merges built-in rules with user overrides. Rules are keyed by target path so later entries replace earlier ones for the same target.
func NormalizeExposePath ¶
func NormalizeExposePath(item config.ExposePath) config.ExposePath
NormalizeExposePath fills implicit defaults and cleans path values so merge and validation logic can work with canonical paths.
func Preflight ¶
func Preflight() error
Preflight validates the configured isolation state and prepares the instance runtime directories before any child process is launched.
func PrepareCommand ¶
PrepareCommand mutates the command in-place so it inherits the configured isolated environment before being started by the caller.
func PrepareInstanceRoot ¶
PrepareInstanceRoot creates the directories required by the isolation runtime.
func ResolveInstanceRoot ¶
ResolveInstanceRoot resolves the instance root used to build the isolated filesystem and redirected user environment.
func Run ¶
Run is the Start-and-Wait helper that keeps the same isolation behavior as Start while returning the command's final exit status.
func Start ¶
Start prepares isolation for the command, starts it, and applies any post-start platform hooks required by the active backend.
func ValidateExposePaths ¶
func ValidateExposePaths(items []config.ExposePath) error
ValidateExposePaths verifies the user-supplied path exposure rules before a child process is started.
Types ¶
type AccessRule ¶
AccessRule describes the effective Windows-side access rule for a host path.
func BuildWindowsAccessRules ¶
func BuildWindowsAccessRules(root string, overrides []config.ExposePath) []AccessRule
BuildWindowsAccessRules derives the host-path access policy used by the Windows restricted-token backend.
type MountRule ¶
MountRule describes a source-to-target mount exposed inside the Linux isolation view.
func BuildLinuxMountPlan ¶
func BuildLinuxMountPlan(root string, overrides []config.ExposePath) []MountRule
BuildLinuxMountPlan converts the merged expose-path configuration into the mount rules consumed by the Linux bubblewrap backend.
type UserEnv ¶
type UserEnv struct {
Home string
Tmp string
Config string
Cache string
State string
AppData string
LocalAppData string
}
UserEnv contains the redirected per-instance user directories injected into isolated child processes.
func ResolveUserEnv ¶
ResolveUserEnv derives the redirected user directories rooted under the instance runtime area.