container

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerRunner

type DockerRunner struct {
	Image   string
	Volume  string
	WorkDir string
	// contains filtered or unexported fields
}

DockerRunner implements Runner for ephemeral Docker containers

func NewDockerRunner

func NewDockerRunner(image, volume string, logger *slog.Logger) (*DockerRunner, error)

func (*DockerRunner) ExecuteCommand

func (d *DockerRunner) ExecuteCommand(ctx context.Context, cmd []string) (string, error)

func (*DockerRunner) ResetWorkspace

func (d *DockerRunner) ResetWorkspace(ctx context.Context, targetFile string) error

func (*DockerRunner) SetupWorkspace

func (d *DockerRunner) SetupWorkspace(ctx context.Context) error

func (*DockerRunner) Start

func (d *DockerRunner) Start(ctx context.Context) error

func (*DockerRunner) Stop

func (d *DockerRunner) Stop(ctx context.Context) error

func (*DockerRunner) WorkspacePath

func (d *DockerRunner) WorkspacePath() string

type Runner

type Runner interface {
	Start(ctx context.Context) error
	SetupWorkspace(ctx context.Context) error
	ExecuteCommand(ctx context.Context, cmd []string) (string, error)
	Stop(ctx context.Context) error
	ResetWorkspace(ctx context.Context, targetFile string) error
	WorkspacePath() string
}

Runner represents the sandbox environment where the evolutionary loop mutates code

Jump to

Keyboard shortcuts

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