local

package
v0.2.30 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MPL-2.0 Imports: 15 Imported by: 1 module, 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 local is the dev/self-host workspace provider: a workspace is a directory under --workspace-local-root, and exec runs the command as the chassis's own uid with that directory as HOME and cwd.

There is NO isolation beyond a scrubbed environment and a cwd guard — the command can read anything the chassis uid can. That is why the chassis refuses this provider unless --workspace-allow-local is set explicitly, never implied by --env, and logs a WARN pair at boot.

import _ "github.com/loremlabs/thanks-computer/chassis/workspace/local"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider keeps every workspace under root.

func New

func New(root string) (*Provider, error)

New creates (if needed) and resolves the root directory. Symlinks in the root are resolved once here so the cwd guard compares real paths.

func (*Provider) Capabilities

func (p *Provider) Capabilities() []string

func (*Provider) Create

func (p *Provider) Create(_ context.Context, spec workspace.Spec) (workspace.Handle, error)

Create makes the directory (idempotent).

func (*Provider) Destroy

func (p *Provider) Destroy(_ context.Context, h workspace.Handle) error

Destroy removes the directory. Guarded to the root so a forged handle cannot remove anything else.

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) Root

func (p *Provider) Root() string

Root is the resolved root directory.

func (*Provider) Sleep

Sleep is a no-op: nothing to park.

func (*Provider) Status

Status is "running" while the directory exists (LastUsed = its mtime), "destroyed" otherwise.

func (*Provider) Wake

Wake checks the directory still exists and hands back a Computer bound to it. Bookkeeping only — a directory is never asleep.

Jump to

Keyboard shortcuts

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