agentexec
package v2.23.0
Go to latest Published: Jun 3, 2025 License:AGPL-3.0
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:16 Opens a new window with list of imports.
Imported by:0 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
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¶
Types¶
typeExecer¶added inv2.19.0
type Execer interface {// 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.CommandContext(ctxcontext.Context, cmdstring, args ...string) *exec.Cmd// PTYCommandContext returns an pty.Cmd that calls "coder agent-exec" prior to exec'ing// the provided command if CODER_PROC_PRIO_MGMT is set, otherwise a normal pty.Cmd// is returned. All instances of pty.Cmd should flow through this function to ensure// proper resource constraints are applied to the child process.PTYCommandContext(ctxcontext.Context, cmdstring, args ...string) *pty.Cmd}
Execer defines an abstraction for creating exec.Cmd variants. It's unfortunatelynecessary because we need to be able to wrap child processes with "coder agent-exec"for templates that expect the agent to manage process priority.
var DefaultExecerExecer = execer{}
Click to show internal directories.
Click to hide internal directories.