endpoint

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: AGPL-3.0 Imports: 10 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 endpoint is the in-sandbox side of workspace sync. It executes filesystem operations it is told to perform and computes nothing: the controller on the engineer's machine decides every action.

That split follows from the lifecycle. This process is terminated without warning whenever the WebSocket drops, the sandbox idles out, or the TTL fires, so anything authoritative held here is state that is routinely lost. It persists exactly two things, both disposable: a root marker and a staging directory.

Index

Constants

View Source
const (
	// ProtocolVersion is what this build speaks. It is the protocol, never the
	// build: the CLI is installed by the engineer and the in-sandbox binary
	// ships with the platform, so differing builds are the normal case.
	ProtocolVersion    = 1
	MinProtocolVersion = 1
)

Variables

This section is empty.

Functions

func Serve

func Serve(opts Options, in io.Reader, out io.Writer) error

Serve runs the request loop until the input stream ends. It returns nil on a clean end-of-stream: the controller closing the pipe is how a session ends.

Types

type Options

type Options struct {
	// Root is the directory to serve, as given on the command line.
	Root string
	// Workspace confines Root after symlink resolution. Empty disables the
	// check, which is what a local test harness wants; inside a sandbox it is
	// the workspace mount and the confinement is real.
	Workspace string
	// Version reports the endpoint build, for diagnostics only. Never used to
	// accept or refuse a session.
	Version string
}

Options configures one endpoint session.

Jump to

Keyboard shortcuts

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