client

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

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 New

func New(conn transport.Conn) *Client

func (*Client) Action

func (c *Client) Action(id uint32, action string) error

func (*Client) Attach

func (c *Client) Attach(id uint32) (<-chan []byte, <-chan bool, error)

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) Close

func (c *Client) Close() error

func (*Client) Kill

func (c *Client) Kill(id uint32) error

func (*Client) ListSessions

func (c *Client) ListSessions() ([]protocol.SessionInfo, error)

func (*Client) NewSession

func (c *Client) NewSession(preset string) (uint32, error)

func (*Client) NewSessionCmd

func (c *Client) NewSessionCmd(command, agent, cwd string, args []string) (uint32, error)

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

func (c *Client) Resize(id uint32, cols, rows int) error

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

func (c *Client) SetActive(id uint32, take bool) error

SetActive requests (take=true) or releases (take=false) active ownership of a shared session's PTY.

func (*Client) SetButton

func (c *Client) SetButton(id uint32, action, value string) error

SetButton rebinds a customizable pad button (custom_1 or custom_2) to a single key name / combo or literal string, for this session only.

func (*Client) TextInput

func (c *Client) TextInput(id uint32, text string) error

type Error

type Error struct{ Message string }

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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