native

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageBackendZFS       = sandbox.StorageBackendZFS
	StorageBackendLocalDisk = sandbox.StorageBackendLocalDisk

	ContainerRuntimeGVisor = sandbox.ContainerRuntimeGVisor
	ContainerRuntimeNone   = sandbox.ContainerRuntimeNone
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerRuntime

type ContainerRuntime = sandbox.ContainerRuntime

type NativeSandboxConfig

type NativeSandboxConfig struct {
	StorageBackend   StorageBackend
	ContainerRuntime ContainerRuntime
}

func DefaultConfig

func DefaultConfig() NativeSandboxConfig

type NativeSandboxEnvironment

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

NativeSandboxEnvironment adapts the ConnectRPC SandboxClient to the ExecutionEnvironment interface. Wraps api.SandboxService (the RPC client interface) and translates between environment-level types and RPC-level types.

Per §3.4 concurrency contract: NativeSandboxEnvironment delegates all state management to the server-side SandboxHostService via RPC, so it does not need internal locking. The sessionID is set during Create() and read-only after that. A destroyed atomic.Bool tracks local Destroy completion to avoid querying a deleted server-side session.

func NewNativeSandboxEnvironment

func NewNativeSandboxEnvironment(service api.SandboxService, config NativeSandboxConfig, logger *slog.Logger) *NativeSandboxEnvironment

func (*NativeSandboxEnvironment) AttachSession

func (e *NativeSandboxEnvironment) AttachSession(sessionID string) error

AttachSession binds this environment to an existing sandbox session. This is used when the orchestrator has already provisioned the sandbox and only tool execution needs to be wired into an agent session.

func (*NativeSandboxEnvironment) Capabilities

func (*NativeSandboxEnvironment) Create

func (*NativeSandboxEnvironment) CreateSnapshot

func (e *NativeSandboxEnvironment) CreateSnapshot(ctx context.Context, name string) (*environment.SnapshotInfo, error)

func (*NativeSandboxEnvironment) Destroy

func (*NativeSandboxEnvironment) ExecuteTool

func (*NativeSandboxEnvironment) Pause

func (*NativeSandboxEnvironment) Resume

func (*NativeSandboxEnvironment) Rollback

func (e *NativeSandboxEnvironment) Rollback(ctx context.Context, snapshotID string) error

func (*NativeSandboxEnvironment) State

State queries the server for the current session state. After Destroy(), returns StateDestroyed without querying (the session is deleted server-side).

type StorageBackend

type StorageBackend = sandbox.StorageBackend

Jump to

Keyboard shortcuts

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