Documentation
¶
Index ¶
- Constants
- type AuthError
- type BackendType
- type DockerExecutor
- type ExecutionContext
- type Executor
- type PodmanExecutor
- type Selector
- func (s *Selector) Close() error
- func (s *Selector) DockerAvailable() bool
- func (s *Selector) GetDocker() *DockerExecutor
- func (s *Selector) ListAvailableBackends() []BackendType
- func (s *Selector) PodmanAvailable() bool
- func (s *Selector) Select(toolName string, backend BackendType) (Executor, error)
Constants ¶
const DefaultTimeout = 30 * time.Minute
DefaultTimeout is the default timeout for container execution (30 minutes)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendType ¶ added in v1.3.0
type BackendType string
BackendType represents the executor backend type
const ( BackendAuto BackendType = "auto" BackendDocker BackendType = "docker" BackendPodman BackendType = "podman" BackendKubernetes BackendType = "kubernetes" )
func ParseBackendType ¶ added in v1.3.0
func ParseBackendType(s string) BackendType
ParseBackendType converts a string to BackendType
func (BackendType) String ¶ added in v1.3.0
func (b BackendType) String() string
String returns the string representation of BackendType
type DockerExecutor ¶
type DockerExecutor struct {
// contains filtered or unexported fields
}
DockerExecutor executes tools using Docker
func NewDockerExecutor ¶
func NewDockerExecutor(dryRun, verbose, quiet bool) (*DockerExecutor, error)
NewDockerExecutor creates a new Docker executor
func (*DockerExecutor) Available ¶ added in v1.3.0
func (e *DockerExecutor) Available() bool
Available checks if Docker daemon is running and accessible
func (*DockerExecutor) Close ¶
func (e *DockerExecutor) Close() error
Close closes the Docker client
func (*DockerExecutor) Name ¶ added in v1.3.0
func (e *DockerExecutor) Name() string
Name returns the executor backend name
func (*DockerExecutor) Run ¶
func (e *DockerExecutor) Run(ctx context.Context, containerConfig *config.ContainerConfig) error
Run executes a tool configuration
func (*DockerExecutor) SetTimeout ¶ added in v1.3.0
func (e *DockerExecutor) SetTimeout(d time.Duration)
SetTimeout sets the execution timeout for containers
type ExecutionContext ¶ added in v1.3.0
type ExecutionContext struct {
DryRun bool // If true, show what would be executed without running
Verbose bool // If true, show detailed output
Workspace string // Project workspace path
}
ExecutionContext provides runtime context for executors
type Executor ¶ added in v1.3.0
type Executor interface {
// Run executes a tool with the given configuration
Run(ctx context.Context, config *config.ContainerConfig) error
// Available checks if this executor backend is available
// For Docker: checks if daemon is running
// For Podman: checks if podman machine is running
Available() bool
// Name returns the executor backend name (docker, podman, kubernetes)
Name() string
// Close releases any resources held by the executor
Close() error
}
Executor defines the interface for executing tools in containers Implementations include DockerExecutor, PodmanExecutor, KubernetesExecutor
type PodmanExecutor ¶ added in v1.3.0
type PodmanExecutor struct {
// contains filtered or unexported fields
}
PodmanExecutor wraps DockerExecutor connected to Podman's Docker-compatible socket. Podman exposes a Docker-compatible API, so we reuse the Docker SDK.
func NewPodmanExecutor ¶ added in v1.4.0
func NewPodmanExecutor(dryRun, verbose, quiet bool) (*PodmanExecutor, error)
NewPodmanExecutor creates a Podman executor via Docker-compatible socket.
func (*PodmanExecutor) Available ¶ added in v1.3.0
func (e *PodmanExecutor) Available() bool
func (*PodmanExecutor) Close ¶ added in v1.3.0
func (e *PodmanExecutor) Close() error
func (*PodmanExecutor) Name ¶ added in v1.3.0
func (e *PodmanExecutor) Name() string
func (*PodmanExecutor) Run ¶ added in v1.3.0
func (e *PodmanExecutor) Run(ctx context.Context, cfg *config.ContainerConfig) error
type Selector ¶ added in v1.3.0
type Selector struct {
// contains filtered or unexported fields
}
Selector manages executor selection based on availability and user preference
func NewSelector ¶ added in v1.3.0
NewSelector creates a new executor selector
func (*Selector) DockerAvailable ¶ added in v1.3.0
DockerAvailable checks if Docker is available
func (*Selector) GetDocker ¶ added in v1.3.0
func (s *Selector) GetDocker() *DockerExecutor
GetDocker returns the Docker executor (may be nil)
func (*Selector) ListAvailableBackends ¶ added in v1.3.0
func (s *Selector) ListAvailableBackends() []BackendType
ListAvailableBackends returns which backends are currently available
func (*Selector) PodmanAvailable ¶ added in v1.3.0
PodmanAvailable checks if Podman is available