agentexec

package
v2.18.5 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvProcPrioMgmt is the environment variable that determines whether
	// we attempt to manage process CPU and OOM Killer priority.
	EnvProcPrioMgmt  = "CODER_PROC_PRIO_MGMT"
	EnvProcOOMScore  = "CODER_PROC_OOM_SCORE"
	EnvProcNiceScore = "CODER_PROC_NICE_SCORE"
)

Variables

This section is empty.

Functions

func CLI

func CLI() error

CLI runs the agent-exec command. It should only be called by the cli package.

func CommandContext

func CommandContext(ctx context.Context, cmd string, args ...string) (*exec.Cmd, error)

CommandContext returns an exec.Cmd that calls "coder agent-exec" prior to exec'ing the provided command if CODER_PROC_PRIO_MGMT is set, otherwise a normal exec.Cmd is returned. All instances of exec.Cmd should flow through this function to ensure proper resource constraints are applied to the child process.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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