process

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package process provides types and functions for managing system processes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

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

Process represents a system process that can execute commands using a shell.

func NewProcess

func NewProcess(
	shell Shell,
	cmd command.Command,
) Process

NewProcess creates and returns a new Process instance with the specified shell and command.

Parameters:

  • shell: The shell environment used to execute commands.
  • cmd: The command to be executed by the process.

func (Process) Execution

func (p Process) Execution(ctx context.Context) exec.Execution

Execution returns the execution result of the process by executing its command in the specified shell.

type Shell

type Shell interface {
	// Execution executes the given command and returns its execution result.
	//
	// Parameters:
	//   - ctx: The context for managing the command execution lifecycle.
	//   - cmd: The command to be executed.
	Execution(
		ctx context.Context,
		cmd command.Command,
	) exec.Execution
}

Shell defines an interface for executing commands in a shell environment.

Directories

Path Synopsis
Package execution provides types and functions for handling process execution results.
Package execution provides types and functions for handling process execution results.
exit
code
Package code provides types and functions for handling process exit codes.
Package code provides types and functions for handling process exit codes.

Jump to

Keyboard shortcuts

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