sandbox

package
v0.107.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RootFromEnv

func RootFromEnv() string

func WithPolicy

func WithPolicy(ctx context.Context, policy *Policy) context.Context

Types

type Policy

type Policy struct {
	Mode     string
	Backend  string
	Root     string
	Network  bool
	Writable []string
	ReadOnly []string
}

func FromContext

func FromContext(ctx context.Context) *Policy

func New

func New(mode, backend, root string, network bool, writable, readOnly []string) *Policy

func (*Policy) Enabled

func (p *Policy) Enabled() bool

func (*Policy) ForRoot

func (p *Policy) ForRoot(root string) *Policy

func (*Policy) Wrap

func (p *Policy) Wrap(ctx context.Context, cmd *exec.Cmd) (*exec.Cmd, error)

Jump to

Keyboard shortcuts

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