Documentation ¶
Index ¶
- Constants
- func ExitCodeFromWaitErr(err error) int
- func RunSimpleCmdInPty(ecmd *exec.Cmd, termSize waveobj.TermSize) ([]byte, error)
- type CmdWrap
- func (cw CmdWrap) Kill()
- func (cw CmdWrap) KillGraceful(timeout time.Duration)
- func (cw CmdWrap) SetSize(w int, h int) error
- func (cw CmdWrap) Start() error
- func (cw CmdWrap) StderrPipe() (io.ReadCloser, error)
- func (cw CmdWrap) StdinPipe() (io.WriteCloser, error)
- func (cw CmdWrap) StdoutPipe() (io.ReadCloser, error)
- func (cw CmdWrap) Wait() error
- type CommandOptsType
- type ConnInterface
- type PipePty
- type SessionWrap
- func (sw SessionWrap) Kill()
- func (sw SessionWrap) KillGraceful(timeout time.Duration)
- func (sw SessionWrap) SetSize(h int, w int) error
- func (sw SessionWrap) Start() error
- func (sw SessionWrap) StderrPipe() (io.ReadCloser, error)
- func (sw SessionWrap) StdinPipe() (io.WriteCloser, error)
- func (sw SessionWrap) StdoutPipe() (io.ReadCloser, error)
- func (sw SessionWrap) Wait() error
- type ShellProc
- func StartRemoteShellProc(termSize waveobj.TermSize, cmdStr string, cmdOpts CommandOptsType, ...) (*ShellProc, error)
- func StartShellProc(termSize waveobj.TermSize, cmdStr string, cmdOpts CommandOptsType) (*ShellProc, error)
- func StartWslShellProc(ctx context.Context, termSize waveobj.TermSize, cmdStr string, ...) (*ShellProc, error)
- type WslCmdWrap
Constants ¶
View Source
const DefaultGracefulKillWait = 400 * time.Millisecond
Variables ¶
This section is empty.
Functions ¶
func ExitCodeFromWaitErr ¶
Types ¶
type CmdWrap ¶
func (CmdWrap) KillGraceful ¶
func (CmdWrap) StderrPipe ¶
func (cw CmdWrap) StderrPipe() (io.ReadCloser, error)
func (CmdWrap) StdoutPipe ¶
func (cw CmdWrap) StdoutPipe() (io.ReadCloser, error)
type CommandOptsType ¶
type ConnInterface ¶
type SessionWrap ¶
func (SessionWrap) Kill ¶
func (sw SessionWrap) Kill()
func (SessionWrap) KillGraceful ¶
func (sw SessionWrap) KillGraceful(timeout time.Duration)
func (SessionWrap) Start ¶
func (sw SessionWrap) Start() error
func (SessionWrap) StderrPipe ¶
func (sw SessionWrap) StderrPipe() (io.ReadCloser, error)
func (SessionWrap) StdinPipe ¶
func (sw SessionWrap) StdinPipe() (io.WriteCloser, error)
func (SessionWrap) StdoutPipe ¶
func (sw SessionWrap) StdoutPipe() (io.ReadCloser, error)
func (SessionWrap) Wait ¶
func (sw SessionWrap) Wait() error
type ShellProc ¶
type ShellProc struct { ConnName string Cmd ConnInterface CloseOnce *sync.Once DoneCh chan any // closed after proc.Wait() returns WaitErr error // WaitErr is synchronized by DoneCh (written before DoneCh is closed) and CloseOnce }
func StartRemoteShellProc ¶
func StartRemoteShellProc(termSize waveobj.TermSize, cmdStr string, cmdOpts CommandOptsType, conn *conncontroller.SSHConn) (*ShellProc, error)
func StartShellProc ¶
func StartWslShellProc ¶ added in v0.9.0
func (*ShellProc) SetWaitErrorAndSignalDone ¶
type WslCmdWrap ¶ added in v0.9.0
func (WslCmdWrap) Kill ¶ added in v0.9.0
func (wcw WslCmdWrap) Kill()
func (WslCmdWrap) KillGraceful ¶ added in v0.9.0
func (wcw WslCmdWrap) KillGraceful(timeout time.Duration)
Click to show internal directories.
Click to hide internal directories.