commandexecutor

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandExecutor

type CommandExecutor interface {
	// Executes shell commands.
	// Returns the stdout contents.
	Execute(ctx context.Context, command string) (string, error)

	// Executes shell commands.
	// Returns the stdout contents.
	// Panics, on failure.
	MustExecute(ctx context.Context, command string) string
}

func NewLocalCommandExecutor

func NewLocalCommandExecutor(streamOutput bool) CommandExecutor

func NewSSHCommandExecutor

func NewSSHCommandExecutor(connection executor.Interface) CommandExecutor

type LocalCommandExecutor

type LocalCommandExecutor struct {
	// contains filtered or unexported fields
}

func (*LocalCommandExecutor) Execute

func (l *LocalCommandExecutor) Execute(ctx context.Context, command string) (string, error)

func (*LocalCommandExecutor) MustExecute

func (l *LocalCommandExecutor) MustExecute(ctx context.Context, command string) string

type SSHCommandExecutor

type SSHCommandExecutor struct {
	// contains filtered or unexported fields
}

func (*SSHCommandExecutor) Execute

func (s *SSHCommandExecutor) Execute(ctx context.Context, command string) (string, error)

func (*SSHCommandExecutor) MustExecute

func (s *SSHCommandExecutor) MustExecute(ctx context.Context, command string) string

Jump to

Keyboard shortcuts

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