sandbox

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	R = Registry{
		// contains filtered or unexported fields
	}
)

Functions

This section is empty.

Types

type Filesystem

type Filesystem struct {
	FullDiskReadAccess bool     `toml:"fullDiskReadAccess"`
	NoCache            bool     `toml:"noCache"`
	ROPaths            []string `toml:"roPaths"`
	RWPaths            []string `toml:"rwPaths"`
}

type Network

type Network struct {
	Deny bool `toml:"deny"`
}

type Policy

type Policy struct {
	Filesystem Filesystem `toml:"fs"`
	Network    Network    `toml:"net"`
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func (Registry) Lookup

func (r Registry) Lookup(id string) (Sandbox, bool)

func (Registry) Register

func (r Registry) Register(id string, s Sandbox)

type Sandbox

type Sandbox interface {
	Exec(ctx context.Context, cmd []string, policy Policy, logger *slog.Logger) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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