Help us shape the future of Go! Take the 2026 Go Developer Survey

sandbox

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package sandbox orchestrates create → proxy/harden → run → destroy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOptions

type CreateOptions struct {
	Spec   driver.Spec
	Policy policy.Document // optional; validated if Version != 0
}

CreateOptions are host-side inputs for a new sandbox.

type Manager

type Manager struct {
	Driver driver.ComputeDriver
	Proxy  proxy.EgressProxy
}

Manager owns sandbox lifecycle for one host.

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, opt CreateOptions) (driver.Handle, error)

Create validates policy (if set), applies proxy policy, creates and starts the sandbox.

func (*Manager) Exec

func (m *Manager) Exec(ctx context.Context, nameOrID string, req driver.ExecRequest) (driver.ExecResult, error)

Exec runs a command inside a named sandbox.

func (*Manager) List

func (m *Manager) List(ctx context.Context) ([]driver.Info, error)

List returns known sandboxes.

func (*Manager) Remove

func (m *Manager) Remove(ctx context.Context, nameOrID string) error

Remove stops and deletes a sandbox by name or id.

Jump to

Keyboard shortcuts

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