connect

package
v0.1.80 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TerminalClient

type TerminalClient struct {
	// contains filtered or unexported fields
}

TerminalClient manages the websocket connection to a remote terminal

func NewTerminalClient

func NewTerminalClient(sandboxURL, token string) (*TerminalClient, error)

NewTerminalClient creates a new terminal client and connects to the remote terminal

func (*TerminalClient) Close

func (t *TerminalClient) Close()

Close closes the terminal connection and cleans up

func (*TerminalClient) Done

func (t *TerminalClient) Done() <-chan struct{}

Done returns a channel that is closed when Close() has completed

func (*TerminalClient) Run

func (t *TerminalClient) Run(ctx context.Context) error

Run starts the terminal session This blocks until the session ends (user exits or connection closes)

type TerminalMessage

type TerminalMessage struct {
	Type string `json:"type"` // "input", "output", "resize", "error"
	Data string `json:"data,omitempty"`
	Cols int    `json:"cols,omitempty"`
	Rows int    `json:"rows,omitempty"`
}

TerminalMessage represents a message to/from the terminal websocket

Jump to

Keyboard shortcuts

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