Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface { // Execute executes the given command Execute(command string, args []string) ([]byte, error) }
Executor is an interface for executing commands.
type LocalExecutor ¶
type LocalExecutor struct {
// contains filtered or unexported fields
}
LocalExecutor is an Executor that runs commands locally.
func NewLocalExecutor ¶
func NewLocalExecutor(logger *slog.Logger, options ...LocalExecutorOption) *LocalExecutor
NewLocalExecutor creates a new LocalExecutor with the given options.
type LocalExecutorOption ¶
type LocalExecutorOption func(e *LocalExecutor)
LocalExecutorOption is an option for configuring a LocalExecutor.
func WithRedirect ¶
func WithRedirect() LocalExecutorOption
WithRedirect is an option that configures the LocalExecutor to redirect the stdout and stderr of the commands to the stdout and stderr of the local process.
func WithRedirectTo ¶
func WithRedirectTo(stdout, stderr io.Writer) LocalExecutorOption
WithRedirectTo is an option that configures the LocalExecutor to redirect the stdout and stderr of the commands to the given writers.
Click to show internal directories.
Click to hide internal directories.