Documentation
¶
Index ¶
- type Client
- func (c *Client) Action(id uint32, action string) error
- func (c *Client) Attach(id uint32) (<-chan []byte, <-chan bool, error)
- func (c *Client) Close() error
- func (c *Client) Kill(id uint32) error
- func (c *Client) ListSessions() ([]protocol.SessionInfo, error)
- func (c *Client) NewSession(preset string) (uint32, error)
- func (c *Client) NewSessionCmd(command, agent, cwd string, args []string) (uint32, error)
- func (c *Client) Resize(id uint32, cols, rows int) error
- func (c *Client) SetActive(id uint32, take bool) error
- func (c *Client) SetButton(id uint32, action, value string) error
- func (c *Client) TextInput(id uint32, text string) error
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Attach ¶
Attach returns a channel of raw output bytes for a session, plus a channel of active-state updates (true/false on each ownership change, e.g. multiple clients sharing one PTY). It spawns a reader goroutine that emits scrollback replay then live output. Action/TextInput are sent over the same underlying conn — the attach goroutine only forwards TypeOutput frames and session_state control frames; other control replies (none expected) are simply dropped.
func (*Client) ListSessions ¶
func (c *Client) ListSessions() ([]protocol.SessionInfo, error)
func (*Client) NewSessionCmd ¶
NewSessionCmd launches an ad-hoc session from a raw command line rather than a configured preset. agent is a free label for the entry list (defaults to command when empty). cwd may be "" to inherit the daemon's working dir.
func (*Client) Resize ¶
Resize updates the remote PTY size. Fire-and-forget (no reply) for the same reason as Kill: a reply would orphan on the next control recv.
func (*Client) SetActive ¶
SetActive requests (take=true) or releases (take=false) active ownership of a shared session's PTY.