command

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateShellConfig added in v0.29.1

func ValidateShellConfig(shell ShellConfig)

Types

type CmdWrapper added in v0.55.0

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

func BuildCommand

func BuildCommand(cmd string, args []string) *CmdWrapper

func BuildCommandContext

func BuildCommandContext(ctx context.Context, shellCmd string) *CmdWrapper

func BuildCommandShellArgContext added in v0.29.1

func BuildCommandShellArgContext(ctx context.Context, shell ShellConfig, cmd string) *CmdWrapper

func (*CmdWrapper) AttachIo added in v0.75.0

func (c *CmdWrapper) AttachIo()

func (*CmdWrapper) ExitCode added in v0.55.0

func (c *CmdWrapper) ExitCode() int

func (*CmdWrapper) Pid added in v0.55.0

func (c *CmdWrapper) Pid() int

func (*CmdWrapper) Run added in v0.60.0

func (c *CmdWrapper) Run() error

func (*CmdWrapper) SetCmdArgs added in v0.55.0

func (c *CmdWrapper) SetCmdArgs()

func (*CmdWrapper) SetDir added in v0.55.0

func (c *CmdWrapper) SetDir(dir string)

func (*CmdWrapper) SetEnv added in v0.55.0

func (c *CmdWrapper) SetEnv(env []string)

func (*CmdWrapper) Start added in v0.55.0

func (c *CmdWrapper) Start() error

func (*CmdWrapper) StderrPipe added in v0.55.0

func (c *CmdWrapper) StderrPipe() (io.ReadCloser, error)

func (*CmdWrapper) StdoutPipe added in v0.55.0

func (c *CmdWrapper) StdoutPipe() (io.ReadCloser, error)

func (*CmdWrapper) Stop added in v0.55.0

func (c *CmdWrapper) Stop(sig int, parentOnly bool) error

func (*CmdWrapper) Wait added in v0.55.0

func (c *CmdWrapper) Wait() error

type CmdWrapperPty added in v0.88.0

type CmdWrapperPty struct {
	*CmdWrapper
	// contains filtered or unexported fields
}

func BuildPtyCommand added in v0.88.0

func BuildPtyCommand(cmd string, args []string) *CmdWrapperPty

func (*CmdWrapperPty) SetCmdArgs added in v0.88.0

func (c *CmdWrapperPty) SetCmdArgs()

func (*CmdWrapperPty) Start added in v0.88.0

func (c *CmdWrapperPty) Start() (err error)

func (*CmdWrapperPty) StderrPipe added in v0.88.0

func (c *CmdWrapperPty) StderrPipe() (io.ReadCloser, error)

func (*CmdWrapperPty) StdoutPipe added in v0.88.0

func (c *CmdWrapperPty) StdoutPipe() (io.ReadCloser, error)

func (*CmdWrapperPty) Wait added in v0.88.0

func (c *CmdWrapperPty) Wait() error

type Commander added in v0.88.0

type Commander interface {
	Stop(sig int, _parentOnly bool) error
	SetCmdArgs()
	Start() error
	Run() error
	Wait() error
	ExitCode() int
	Pid() int
	StdoutPipe() (io.ReadCloser, error)
	StderrPipe() (io.ReadCloser, error)
	AttachIo()
	SetEnv(env []string)
	SetDir(dir string)
}

type MockCommand added in v0.55.0

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

func NewMockCommand added in v0.55.0

func NewMockCommand() *MockCommand

func (*MockCommand) ExitCode added in v0.55.0

func (c *MockCommand) ExitCode() int

func (*MockCommand) Pid added in v0.55.0

func (c *MockCommand) Pid() int

func (*MockCommand) SetCmdArgs added in v0.55.0

func (c *MockCommand) SetCmdArgs()

func (*MockCommand) SetDir added in v0.55.0

func (c *MockCommand) SetDir(dir string)

func (*MockCommand) SetEnv added in v0.55.0

func (c *MockCommand) SetEnv(env []string)

func (*MockCommand) Start added in v0.55.0

func (c *MockCommand) Start() error

func (*MockCommand) StderrPipe added in v0.55.0

func (c *MockCommand) StderrPipe() (io.ReadCloser, error)

func (*MockCommand) StdoutPipe added in v0.55.0

func (c *MockCommand) StdoutPipe() (io.ReadCloser, error)

func (*MockCommand) Stop added in v0.55.0

func (c *MockCommand) Stop(_ int) error

func (*MockCommand) Wait added in v0.55.0

func (c *MockCommand) Wait() error

type ShellConfig added in v0.29.1

type ShellConfig struct {
	ShellCommand  string `yaml:"shell_command"`
	ShellArgument string `yaml:"shell_argument"`
}

func DefaultShellConfig added in v0.29.1

func DefaultShellConfig() *ShellConfig

Jump to

Keyboard shortcuts

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