libtmux Reference MCP Search
On this page

tmuxtest.ControlMode

View as Markdown

Module
tmuxtest
Package
github.com/libtmux/libtmux-go/tmux
Source
tmux/tmuxtest/control.go
struct tmuxtest.ControlMode
struct [source]
struct [source]
struct tmuxtest.ControlMode

ControlMode is an attached tmux control client for real-tmux tests. It owns one stdout reader and a temporary-file spool, which preserves unread protocol output until ControlMode.Close releases it. Instances come from NewControlMode ; do not construct them directly or read concurrently.

7 declared, 0 inherited

Members

  • ClientName method ClientName returns the tmux-assigned identity captured at registration.
  • Close method Close stops the control client and releases its output spool. It is safe to call concurrently and more than once.
  • CloseContext method CloseContext starts an idempotent shutdown and waits within ctx. Concurrent calls join the same shutdown. If ctx ends after shutdown starts, shutdown continues and a later call may wait for completion; an already-ended ctx does not start shutdown.
  • Read method Read reads control-protocol output within ctx. Exactly one caller may read at a time. After the client exits, callers may drain preserved output through io.EOF; after ControlMode.Close , a non-empty Read returns os.ErrClosed. It returns ctx errors while waiting for output.
  • Server method Server returns the validated server handle captured at construction.
  • Session method Session returns the validated session handle captured at construction.
  • Wait method Wait blocks until the control client exits or ctx ends. It does not stop or close the client; use ControlMode.Close to release it.
Esc

Type to search.