proc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 17 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 proc manages external plugin processes: spawn, readiness, log pumping, and lifecycle. Platform behavior lives in sys_linux.go, sys_darwin.go, and sys_windows.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Bin        string
	Role       contract.Role
	Token      string
	ConfigPath string
	PluginDir  string
	WorkDir    string
	Logger     *slog.Logger
}

type Process

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

func Spawn

func Spawn(ctx context.Context, cfg Config) (*Process, error)

func (*Process) Addr

func (p *Process) Addr() string

func (*Process) ExitCode

func (p *Process) ExitCode() int

func (*Process) Exited

func (p *Process) Exited() <-chan struct{}

Exited returns a channel that is closed when the process exits.

func (*Process) Kill

func (p *Process) Kill() error

func (*Process) ReadyInfo

func (p *Process) ReadyInfo() Ready

func (*Process) Stop

func (p *Process) Stop() error

func (*Process) Terminate

func (p *Process) Terminate() error

func (*Process) Wait

func (p *Process) Wait() error

type Ready

type Ready struct {
	Ready           bool `json:"ready"`
	ProtocolVersion int  `json:"protocolVersion"`
	PID             int  `json:"pid,omitempty"`
	Port            int  `json:"port,omitempty"` // contract: integer, TCP mode only
}

Jump to

Keyboard shortcuts

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