transport

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package transport carries the sync endpoint protocol over the Terminal Proxy WebSocket, presenting it to the client as a plain reader and writer.

A non-TTY session tags each output frame with the stream it came from, so the protocol stream can be separated from diagnostics. A TTY session cannot carry this protocol at all: a PTY merges the two at the kernel and translates line endings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn is one endpoint session. Read yields protocol bytes; diagnostics are collected separately and surfaced when something fails.

func Dial

func Dial(ctx context.Context, websocketURL, ticket string, httpClient *http.Client) (*Conn, error)

Dial opens the session. The ticket is single-use and short-lived, which is why it travels as a query parameter rather than a bearer token.

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Diagnostics

func (c *Conn) Diagnostics() string

Diagnostics is whatever the endpoint wrote to stderr, surfaced by the CLI when a session fails.

func (*Conn) Read

func (c *Conn) Read(p []byte) (int, error)

Read returns protocol bytes only. Frames tagged as stderr are diverted to the diagnostics buffer: one byte of them in the protocol stream would corrupt it beyond recovery.

func (*Conn) Write

func (c *Conn) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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