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

processes

package
v0.38.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages a set of processes.

func NewManager

func NewManager() *Manager

NewManager creates and returns a Manager.

func (*Manager) CancelRunningProcesses

func (m *Manager) CancelRunningProcesses()

CancelRunningProcesses cancels execution of all running processes.

func (*Manager) DeleteProcess

func (m *Manager) DeleteProcess(id string) error

DeleteProcess deletes the specified process.

func (*Manager) Get

func (m *Manager) Get(id string) (*Process, bool)

Get returns the specified process.

func (*Manager) ListProcesses

func (m *Manager) ListProcesses() (res []*ProcessInfo)

ListProcesses lists all running processes.

func (*Manager) StartProcess

func (m *Manager) StartProcess(pid string, resultCtx *build.ResultHandle, cfg *build.InvokeConfig) (*Process, error)

StartProcess starts a process in the container. When a container isn't available (i.e. first time invoking or the container has exited) or cfg.Rollback is set, this method will start a new container and run the process in it. Otherwise, this method starts a new process in the existing container.

type Process

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

Process provides methods to control a process.

func (*Process) Done

func (p *Process) Done() <-chan error

Done returns a channel where error or nil will be sent when the process exits. TODO: change this to Wait()

func (*Process) ForwardIO

func (p *Process) ForwardIO(in *ioset.In, ioCancelCallback func(error))

ForwardIO forwards process's io to the specified reader/writer. Optionally specify ioCancelCallback which will be called when the process closes the specified IO. This will be useful for additional cleanup.

type ProcessInfo

type ProcessInfo struct {
	ProcessID    string
	InvokeConfig *build.InvokeConfig
}

Jump to

Keyboard shortcuts

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