process

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Name string
	PID  int
}

type Manager

type Manager struct {
	HomeDir string
}

func (Manager) Kill

func (m Manager) Kill(name string) error

func (Manager) List

func (m Manager) List() ([]Entry, error)

func (Manager) WaitGone

func (m Manager) WaitGone(pid int, name string, timeout time.Duration) bool

WaitGone polls until the process with pid is gone and the pid file is deleted. Returns true if both conditions are met within timeout.

func (Manager) WaitReady added in v0.3.1

func (m Manager) WaitReady(name string, directPID int, pidTimeout, stabilityWindow time.Duration) (int, error)

WaitReady polls until the server writes its PID file, then holds for stabilityWindow to confirm the process hasn't crashed immediately. directPID is the OS PID returned by Runner.Run; if it exits before the PID file appears the function fails fast. Returns the PID read from the file on success.

type Runner

type Runner struct {
	HomeDir string
}

func (Runner) Command

func (r Runner) Command(p profile.Profile) (string, error)

func (Runner) Run

func (r Runner) Run(p profile.Profile) (int, error)

Run launches the server process and returns the OS PID of the launched process. The server writes its own PID to the .pid file; use Manager.WaitReady to confirm startup.

Jump to

Keyboard shortcuts

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