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
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.
Click to show internal directories.
Click to hide internal directories.