Documentation
¶
Overview ¶
Package console is a terminal client for the same API used by the web UI.
Index ¶
- func PickTarget(in io.Reader, out io.Writer, targets []TargetOption) (int64, error)
- func RunControls(c *Client, in io.Reader, out io.Writer, opts DashboardOptions) error
- func RunDashboard(c *Client, in io.Reader, out io.Writer, attach func(string, string) error) error
- func RunDashboardWithOptions(c *Client, in io.Reader, out io.Writer, opts DashboardOptions) error
- type Client
- type DashboardOptions
- type HTTPError
- type TargetOption
- type UI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PickTarget ¶
PickTarget presents a searchable, keyboard-driven target picker. Callers should resolve an explicit name or ID before invoking this for scripts.
func RunControls ¶ added in v2.4.0
RunControls renders the dashboard without native attachment actions. It is the surface behind `lectern controls` and the attached terminal's Ctrl-] popup: ordinary Lectern actions stay available, but opening another terminal would nest an attachment inside itself.
func RunDashboard ¶
RunDashboard uses a full-screen renderer that owns raw mode, resizing and the suspend/restore boundary around native tmux/SSH. The line client remains useful for pipes and accessibility via console --plain.
func RunDashboardWithOptions ¶ added in v2.4.0
RunDashboardWithOptions enables native attachment and background workspace tabs.
Types ¶
type Client ¶
func (*Client) Download ¶
Download streams arbitrary binary files without the JSON response size limit. Existing local files are preserved, including when the transfer fails.
type DashboardOptions ¶ added in v2.4.0
type DashboardOptions struct {
Attach func(string, string) error
OpenTerminal func(string, string, bool) error
OpenBatch func([]string) error
TerminalWorkspace bool
BatchOpen bool
InitialSessionID string
// Insert types text into the attached terminal without submitting it. Only
// the Ctrl-] controls popup sets it, where a real pane sits underneath.
Insert func(string) error
ControlOnly bool
Popup bool
FocusKind string
FocusID string
Action string
}
DashboardOptions selects which dashboard surface to render.
type TargetOption ¶
TargetOption is the small, display-oriented target shape used by the command-line target picker.