web

package
v0.244.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const Path = "/terminal/"

Path is where the daemon's binding listener serves the terminal.

View Source
const ScreenPath = "/screen/"

ScreenPath is where the daemon's binding listener serves a session's latest screen frame: GET ScreenPath?id=<session> with the binding token as a bearer.

Variables

This section is empty.

Functions

func URL added in v0.244.0

func URL(binding config.Binding, token string) string

URL is where a browser on this machine opens the terminal, carrying the token the page sends in its init frame.

Types

type Screen added in v0.244.0

type Screen struct {
	Token       string
	ClientCerts bool
	Frame       func(ctx context.Context, sessionID string) (*agentdomain.Frame, error)
}

Screen serves the latest screen frame of a session's worker as an image, for the web terminal's live view. Frame asks the daemon for it wherever the session runs.

func (*Screen) ServeHTTP added in v0.244.0

func (s *Screen) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Terminal added in v0.244.0

type Terminal struct {
	Token       string
	ClientCerts bool
	Command     func(sessionID string) *exec.Cmd
	// contains filtered or unexported fields
}

Terminal serves the browser terminal under Path on the daemon's binding listener: the xterm page, and one PTY per socket running Command on a session id of the tab's own, which the tab learns from the init reply. A token matching Token, or a verified client certificate when ClientCerts is set, authorizes a socket.

func (*Terminal) ServeHTTP added in v0.244.0

func (t *Terminal) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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