Documentation
¶
Overview ¶
Package herdr is the only code that calls herdr. It runs the herdr CLI with argument lists, parses its JSON replies, and turns error replies into *Error.
Inside a herdr pane the CLI finds its session through HERDR_SOCKET_PATH, which herdr injects, so the panel talks to whichever session it runs in.
Index ¶
- Variables
- func InPane() bool
- func IsNotRunning(err error) bool
- type Client
- func (c *Client) Check(ctx context.Context) (string, error)
- func (c *Client) CreateWorkspace(ctx context.Context, cwd, label string, focus bool) (Workspace, Pane, error)
- func (c *Client) FocusWorkspace(ctx context.Context, id string) error
- func (c *Client) Pane(ctx context.Context, id string) (Pane, error)
- func (c *Client) Panes(ctx context.Context, workspaceID string) ([]Pane, error)
- func (c *Client) ProcessInfo(ctx context.Context, pane string) (ProcessInfo, error)
- func (c *Client) Rename(ctx context.Context, pane, label string) error
- func (c *Client) Run(ctx context.Context, pane, command string) error
- func (c *Client) SendKeys(ctx context.Context, pane string, keys ...string) error
- func (c *Client) Split(ctx context.Context, pane, direction, cwd string, focus bool) (Pane, error)
- func (c *Client) Version(ctx context.Context) ([3]int, string, error)
- func (c *Client) WithTrace(calls *[]string) *Client
- func (c *Client) Workspaces(ctx context.Context) ([]Workspace, error)
- type Error
- type Pane
- type Process
- type ProcessInfo
- type Workspace
Constants ¶
This section is empty.
Variables ¶
var MinVersion = [3]int{0, 8, 0}
MinVersion is the oldest herdr whose JSON replies this adapter was written against.
Functions ¶
func IsNotRunning ¶
IsNotRunning reports whether err means no herdr server is listening.
Types ¶
type Client ¶
Client runs herdr commands. Trace, when set, receives every command line with its error, so callers can put the exact herdr calls in the audit log.
func (*Client) Check ¶
Check confirms herdr is installed, new enough and has a running server. It returns a one-line status for the top bar.
func (*Client) CreateWorkspace ¶
func (c *Client) CreateWorkspace(ctx context.Context, cwd, label string, focus bool) (Workspace, Pane, error)
CreateWorkspace makes a workspace whose first pane starts in cwd.