executor

package
v0.67.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package executor runs prompt files inside Docker containers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerChecker added in v0.65.0

type ContainerChecker interface {
	IsRunning(ctx context.Context, name string) (bool, error)
}

ContainerChecker checks whether a Docker container is currently running.

func NewDockerContainerChecker added in v0.65.0

func NewDockerContainerChecker() ContainerChecker

NewDockerContainerChecker creates a ContainerChecker backed by docker inspect.

type Executor added in v0.2.0

type Executor interface {
	Execute(ctx context.Context, promptContent string, logFile string, containerName string) error
	// Reattach connects to a running container's output stream and waits for it to exit.
	// It does not create a new container. The log file is overwritten from the beginning
	// of the container's output (docker logs replays all output from container start).
	// Returns nil when the container exits successfully.
	Reattach(ctx context.Context, logFile string, containerName string) error
	StopAndRemoveContainer(ctx context.Context, containerName string)
}

Executor executes a prompt.

func NewDockerExecutor added in v0.2.0

func NewDockerExecutor(
	containerImage string,
	projectName string,
	model string,
	netrcFile string,
	gitconfigFile string,
	env map[string]string,
) Executor

NewDockerExecutor creates a new Executor using Docker with the specified container image.

Jump to

Keyboard shortcuts

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