workspace

package
v1.5.140 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 32 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 workspace owns golder's integrated terminal workspace. The visible client and the persistent daemon use the same executable, in separate processes, so detaching a client does not kill its panes. The retained client and daemon are Go dependencies, not programs that must be installed on PATH.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Version    string
	Executable string
	Input      *os.File
	Output     *os.File
	// contains filtered or unexported fields
}

Backend implements workspacecmd.Backend. One Backend owns at most one workspace; Close must be called even if printing readiness fails.

func (*Backend) Close

func (b *Backend) Close()

Close stops only this backend's daemon, releases its state lease and waits for cleanup. It never signals a pid read from a file or kills another server.

func (*Backend) Remove added in v1.5.5

func (b *Backend) Remove(ctx context.Context, opts workspacecmd.Options) error

Remove only touches the fixed named-session directory, after both its name and state leases are held and its owner has been proved stopped. Overrides outside that directory (a custom state/config/socket) are never deleted.

func (*Backend) Start

Start starts the daemon and its first pane, then runs the visible client unless Headless was requested. In headless mode the caller prints readiness and calls Wait; returning from Start must not terminate a ready daemon.

func (*Backend) Status

func (b *Backend) Status(ctx context.Context, opts workspacecmd.Options) ([]byte, error)

Status proves ownership through the private lifecycle endpoint, then asks the ordinary control protocol for this session's panes. No executable names, stale pid files or focused panes are used as identity evidence.

func (*Backend) Stop

func (b *Backend) Stop(ctx context.Context, opts workspacecmd.Options) error

Stop asks the exact workspace owner to cancel its own context. The token is read from an owner-only record, never returned in status/readiness or logged.

func (*Backend) Wait

func (b *Backend) Wait(ctx context.Context) error

Wait keeps a headless workspace alive after readiness has been written. A normal owner-stop request succeeds; cancellation returns the caller's error.

Jump to

Keyboard shortcuts

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