sandbox

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigurationLlamaCpp = ``

ConfigurationLlamaCpp is the sandbox configuration for llama.cpp processes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sandbox

type Sandbox interface {
	// Command returns the sandboxed process handle.
	Command() *exec.Cmd
	// Close closes the sandbox, terminating the process if it's still running.
	Close() error
}

Sandbox encapsulates a single running sandboxed process.

func Create

func Create(ctx context.Context, configuration string, modifier func(*exec.Cmd), updatedBinPath, name string, arg ...string) (Sandbox, error)

Create creates a sandbox containing a single process that has been started. The ctx, name, and arg arguments correspond to their counterparts in os/exec.CommandContext. The configuration argument specifies the sandbox configuration, for which a pre-defined value should be used. The modifier function allows for an optional callback (which may be nil) to configure the command before it is started.

Jump to

Keyboard shortcuts

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