agent
packageThis package is not in the latest version of its module.
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¶
const (ProtocolReconnectingPTY = "reconnecting-pty"ProtocolSSH = "ssh"ProtocolDial = "dial")
const EnvAgentSubsystem = "CODER_AGENT_SUBSYSTEM"
EnvAgentSubsystem is the environment variable used to denote thespecialized environment in which the agent is running(e.g. envbox, envbuilder).
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeClient¶added inv0.11.0
type Client interface {Manifest(ctxcontext.Context) (agentsdk.Manifest,error)Listen(ctxcontext.Context) (net.Conn,error)ReportStats(ctxcontext.Context, logslog.Logger, statsChan <-chan *agentsdk.Stats, setInterval func(time.Duration)) (io.Closer,error)PostLifecycle(ctxcontext.Context, stateagentsdk.PostLifecycleRequest)errorPostAppHealth(ctxcontext.Context, reqagentsdk.PostAppHealthsRequest)errorPostStartup(ctxcontext.Context, reqagentsdk.PostStartupRequest)errorPostMetadata(ctxcontext.Context, keystring, reqagentsdk.PostMetadataRequest)errorPatchStartupLogs(ctxcontext.Context, reqagentsdk.PatchStartupLogs)errorGetServiceBanner(ctxcontext.Context) (codersdk.ServiceBannerConfig,error)}
typeOptions¶
type Options struct {Filesystemafero.FsLogDirstringTempDirstringExchangeToken func(ctxcontext.Context) (string,error)ClientClientReconnectingPTYTimeouttime.DurationEnvironmentVariables map[string]stringLoggerslog.LoggerIgnorePorts map[int]stringSSHMaxTimeouttime.DurationTailnetListenPortuint16Subsystemcodersdk.AgentSubsystemAddresses []netip.PrefixPrometheusRegistry *prometheus.RegistryReportMetadataIntervaltime.DurationServiceBannerRefreshIntervaltime.Duration}
typePostWorkspaceAgentAppHealth¶added inv0.9.0
type PostWorkspaceAgentAppHealth func(context.Context,agentsdk.PostAppHealthsRequest)error
PostWorkspaceAgentAppHealth updates the workspace app health.
typeWorkspaceAgentApps¶added inv0.9.0
type WorkspaceAgentApps func(context.Context) ([]codersdk.WorkspaceApp,error)
WorkspaceAgentApps fetches the workspace apps.
typeWorkspaceAppHealthReporter¶added inv0.9.0
WorkspaceAppHealthReporter is a function that checks and reports the health of the workspace apps until the passed context is canceled.
funcNewWorkspaceAppHealthReporter¶added inv0.9.0
func NewWorkspaceAppHealthReporter(loggerslog.Logger, apps []codersdk.WorkspaceApp, postWorkspaceAgentAppHealthPostWorkspaceAgentAppHealth)WorkspaceAppHealthReporter
NewWorkspaceAppHealthReporter creates a WorkspaceAppHealthReporter that reports app health to coderd.