Help us shape the future of Go! Take the 2026 Go Developer Survey

process

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package process implements the runtime.Runtime port by supervising functions as plain OS child processes (ADR-0011). It is the cross-platform dev/e2e/CI driver — no root, no containerd — and is the driver the InMemory() harness and unit tests use. It is not an isolation boundary; production uses the containerd driver.

Index

Constants

View Source
const DefaultStopGrace = 3 * time.Second

DefaultStopGrace is how long Stop waits after SIGTERM before sending SIGKILL unless runtime.process.stopGrace sets it (ADR-0167).

Variables

This section is empty.

Functions

func New

func New(logger *slog.Logger) runtime.Runtime

New returns a process-backed runtime.Runtime (cross-platform; dev/e2e/CI) that saves nothing and logs through logger (nil means slog.Default()).

func Open added in v0.5.0

func Open(ctx context.Context, stateDir string, stopGrace time.Duration, logger *slog.Logger) (runtime.Runtime, error)

Open returns a process driver that saves its workers in <stateDir>/workers.json (ADR-0167). Before it returns it reaps the workers a crashed run left there; the reconciler then re-creates the replicas. A stopGrace <= 0 is the 3 s default. It logs through logger (nil means slog.Default()).

func PythonShimLoadError added in v0.2.2

func PythonShimLoadError(ctx context.Context, python, shimDir string) string

PythonShimLoadError imports the extracted python shim (shimDir holds funcd_shim) with the interpreter, so a caller registers only a python that can run it (ADR-0049, ADR-0123); the probe checks what the shim really needs instead of restating it. "" ⇒ it loads; otherwise the interpreter's last output line (e.g. the SyntaxError or ModuleNotFoundError).

Types

This section is empty.

Jump to

Keyboard shortcuts

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