Documentation
¶
Index ¶
- type Tmux
- func (t *Tmux) CaptureOutput(ctx context.Context, proc *runtime.Process) (string, error)
- func (t *Tmux) Close() error
- func (t *Tmux) Kill(ctx context.Context, proc *runtime.Process) error
- func (t *Tmux) Respawn(ctx context.Context, proc *runtime.Process, command string) error
- func (t *Tmux) SendInput(ctx context.Context, proc *runtime.Process, keys ...string) error
- func (t *Tmux) StartProcess(ctx context.Context, name, workDir, command string) (*runtime.Process, error)
- func (t *Tmux) Watch(ctx context.Context, proc *runtime.Process, handler runtime.OutputHandler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tmux ¶
type Tmux struct {
// contains filtered or unexported fields
}
Tmux implements runtime.Runtime using tmux sessions.
func (*Tmux) CaptureOutput ¶
CaptureOutput captures the visible pane output (last 80 lines).
func (*Tmux) StartProcess ¶
func (t *Tmux) StartProcess(ctx context.Context, name, workDir, command string) (*runtime.Process, error)
StartProcess creates a new tmux window running the given command.
func (*Tmux) Watch ¶
func (t *Tmux) Watch(ctx context.Context, proc *runtime.Process, handler runtime.OutputHandler) error
Watch streams process output via tmux pipe-pane through a FIFO. The handler receives a sliding window of the latest ~3200 characters each time new output arrives. Blocks until ctx is canceled.
Click to show internal directories.
Click to hide internal directories.