supervisor

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package supervisor supplies explicit, host-leased runtime process ownership.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(args []string)

Main is the dedicated supervisor executable entry point; it always exits the process. It must never run inside the host or the runtime plugin process. On Windows, exiting closes the supervisor's non-inherited Job Object handle.

func Runner

func Runner(options Options) func(hclog.Logger, *exec.Cmd, string) (runner.Runner, error)

Runner returns a go-plugin RunnerFunc. Configure RunnerFunc instead of Cmd; the go-plugin client explicitly owns the supervisor until Client.Kill returns. SupervisorBinary must implement Main's dedicated helper entry point.

Types

type Options

type Options struct {
	SupervisorBinary string
	SupervisorArgs   []string
	RuntimeBinary    string
	Args             []string
	Env              []string
	Directory        string
}

Options selects already verified executables. Env overrides the environment selected by go-plugin. Restricting runtime inheritance requires the client to set SkipHostEnv; supplying a few Env entries alone does not restrict it. Client-assigned transport metadata takes precedence over Env overrides.

Jump to

Keyboard shortcuts

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