native

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package native launches a session worker as a child process of the controller.

The child is the same Peen binary running `peen worker`, started in the session workspace under the controller's own process identity. Its launch document arrives on stdin, so the credential never appears in the process table or on disk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Launcher

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

Launcher starts native workers.

func New

func New(options Options) (*Launcher, error)

New resolves the binary a native worker runs.

func (*Launcher) Kind

func (l *Launcher) Kind() worker.Kind

Kind reports the profile kind this launcher serves.

func (*Launcher) Launch

func (l *Launcher) Launch(
	ctx context.Context,
	request worker.LaunchRequest,
) (worker.Process, error)

Launch starts one `peen worker` child in the session workspace.

type Options

type Options struct {
	// BinaryPath is the Peen binary to run. Empty means this process's own
	// executable, which is what makes a native worker the same build as its
	// controller.
	BinaryPath string

	// Environment is the base environment every worker inherits. Empty means
	// the controller's own.
	Environment []string
}

Options builds a native launcher.

Jump to

Keyboard shortcuts

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