Movatterモバイル変換


[0]ホーム

URL:


agentexec

package
v2.23.0Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License:AGPL-3.0Imports:16Imported by:0

Details

Repository

github.com/coder/coder

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

funcCLI

func CLI()error

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

Types

typeExeceradded 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{}

funcNewExeceradded inv2.19.0

func NewExecer() (Execer,error)

Source Files

View all Source files

Directories

PathSynopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp