package processes
import "github.com/docker/buildx/controller/processes"
Index ¶
- type Manager
- func NewManager() *Manager
- func (m *Manager) CancelRunningProcesses()
- func (m *Manager) DeleteProcess(id string) error
- func (m *Manager) Get(id string) (*Process, bool)
- func (m *Manager) ListProcesses() (res []*pb.ProcessInfo)
- func (m *Manager) StartProcess(pid string, resultCtx *build.ResultHandle, cfg *pb.InvokeConfig) (*Process, error)
- type Process
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 ¶
DeleteProcess deletes the specified process.
func (*Manager) Get ¶
Get returns the specified process.
func (*Manager) ListProcesses ¶
func (m *Manager) ListProcesses() (res []*pb.ProcessInfo)
ListProcesses lists all running processes.
func (*Manager) StartProcess ¶
func (m *Manager) StartProcess(pid string, resultCtx *build.ResultHandle, cfg *pb.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 ¶
Done returns a channel where error or nil will be sent when the process exits. TODO: change this to Wait()
func (*Process) ForwardIO ¶
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.
Source Files ¶
- Version
- v0.22.0 (latest)
- Published
- Mar 17, 2025
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 4 weeks ago –
Tools for package owners.