Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProtocolReconnectingPTY = "reconnecting-pty" ProtocolSSH = "ssh" ProtocolDial = "dial" )
View Source
const ( EnvProcPrioMgmt = "CODER_PROC_PRIO_MGMT" EnvProcOOMScore = "CODER_PROC_OOM_SCORE" )
EnvProcPrioMgmt determines whether we attempt to manage process CPU and OOM Killer priority.
View Source
const EnvAgentSubsystem = "CODER_AGENT_SUBSYSTEM"
EnvAgentSubsystem is the environment variable used to denote the specialized environment in which the agent is running (e.g. envbox, envbuilder).
Variables ¶
This section is empty.
Functions ¶
func PrometheusMetricsHandler ¶ added in v2.10.0
Types ¶
type Agent ¶
type Client ¶
type Client interface { ConnectRPC23(ctx context.Context) ( proto.DRPCAgentClient23, tailnetproto.DRPCTailnetClient23, error, ) RewriteDERPMap(derpMap *tailcfg.DERPMap) }
type Options ¶
type Options struct { Filesystem afero.Fs LogDir string TempDir string ScriptDataDir string ExchangeToken func(ctx context.Context) (string, error) Client Client ReconnectingPTYTimeout time.Duration EnvironmentVariables map[string]string Logger slog.Logger IgnorePorts map[int]string PortCacheDuration time.Duration SSHMaxTimeout time.Duration TailnetListenPort uint16 Subsystems []codersdk.AgentSubsystem PrometheusRegistry *prometheus.Registry ReportMetadataInterval time.Duration ServiceBannerRefreshInterval time.Duration Syscaller agentproc.Syscaller // ModifiedProcesses is used for testing process priority management. ModifiedProcesses chan []*agentproc.Process // ProcessManagementTick is used for testing process priority management. ProcessManagementTick <-chan time.Time BlockFileTransfer bool }
type PostWorkspaceAgentAppHealth ¶
type PostWorkspaceAgentAppHealth func(context.Context, agentsdk.PostAppHealthsRequest) error
PostWorkspaceAgentAppHealth updates the workspace app health.
type WorkspaceAppHealthReporter ¶
WorkspaceAppHealthReporter is a function that checks and reports the health of the workspace apps until the passed context is canceled.
func NewAppHealthReporterWithClock ¶ added in v2.13.0
func NewAppHealthReporterWithClock( logger slog.Logger, apps []codersdk.WorkspaceApp, postWorkspaceAgentAppHealth PostWorkspaceAgentAppHealth, clk quartz.Clock, ) WorkspaceAppHealthReporter
NewAppHealthReporterWithClock is only called directly by test code. Product code should call NewAppHealthReporter.
func NewWorkspaceAppHealthReporter ¶
func NewWorkspaceAppHealthReporter(logger slog.Logger, apps []codersdk.WorkspaceApp, postWorkspaceAgentAppHealth PostWorkspaceAgentAppHealth) WorkspaceAppHealthReporter
NewWorkspaceAppHealthReporter creates a WorkspaceAppHealthReporter that reports app health to coderd.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package agentproc contains logic for interfacing with local processes running in the same context as the agent.
|
Package agentproc contains logic for interfacing with local processes running in the same context as the agent. |
agentproctest
Package agentproctest contains utility functions for testing process management in the agent.
|
Package agentproctest contains utility functions for testing process management in the agent. |
Package reaper contains logic for reaping subprocesses.
|
Package reaper contains logic for reaping subprocesses. |
Click to show internal directories.
Click to hide internal directories.