mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: allow multiple agent subsystems, add exectrace (#8933)
This commit is contained in:
+4
-4
@@ -64,7 +64,7 @@ type Options struct {
|
||||
IgnorePorts map[int]string
|
||||
SSHMaxTimeout time.Duration
|
||||
TailnetListenPort uint16
|
||||
Subsystem codersdk.AgentSubsystem
|
||||
Subsystems []codersdk.AgentSubsystem
|
||||
Addresses []netip.Prefix
|
||||
PrometheusRegistry *prometheus.Registry
|
||||
ReportMetadataInterval time.Duration
|
||||
@@ -145,7 +145,7 @@ func New(options Options) Agent {
|
||||
reportMetadataInterval: options.ReportMetadataInterval,
|
||||
serviceBannerRefreshInterval: options.ServiceBannerRefreshInterval,
|
||||
sshMaxTimeout: options.SSHMaxTimeout,
|
||||
subsystem: options.Subsystem,
|
||||
subsystems: options.Subsystems,
|
||||
addresses: options.Addresses,
|
||||
|
||||
prometheusRegistry: prometheusRegistry,
|
||||
@@ -167,7 +167,7 @@ type agent struct {
|
||||
// listing all listening ports. This is helpful to hide ports that
|
||||
// are used by the agent, that the user does not care about.
|
||||
ignorePorts map[int]string
|
||||
subsystem codersdk.AgentSubsystem
|
||||
subsystems []codersdk.AgentSubsystem
|
||||
|
||||
reconnectingPTYs sync.Map
|
||||
reconnectingPTYTimeout time.Duration
|
||||
@@ -609,7 +609,7 @@ func (a *agent) run(ctx context.Context) error {
|
||||
err = a.client.PostStartup(ctx, agentsdk.PostStartupRequest{
|
||||
Version: buildinfo.Version(),
|
||||
ExpandedDirectory: manifest.Directory,
|
||||
Subsystem: a.subsystem,
|
||||
Subsystems: a.subsystems,
|
||||
})
|
||||
if err != nil {
|
||||
return xerrors.Errorf("update workspace agent version: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user