mirror of
https://github.com/coder/coder.git
synced 2026-10-28 02:42:54 +08:00
feat: Add connection_timeout and troubleshooting_url to agent (#4937)
* feat: Add connection_timeout and troubleshooting_url to agent This commit adds the connection timeout and troubleshooting url fields to coder agents. If an initial connection cannot be established within connection timeout seconds, then the agent status will be marked as `"timeout"`. The troubleshooting URL will be present, if configured in the Terraform template, it can be presented to the user when the agent state is either `"timeout"` or `"disconnected"`. Fixes #4678
This commit is contained in:
@@ -32,6 +32,7 @@ const (
|
||||
WorkspaceAgentConnecting WorkspaceAgentStatus = "connecting"
|
||||
WorkspaceAgentConnected WorkspaceAgentStatus = "connected"
|
||||
WorkspaceAgentDisconnected WorkspaceAgentStatus = "disconnected"
|
||||
WorkspaceAgentTimeout WorkspaceAgentStatus = "timeout"
|
||||
)
|
||||
|
||||
type WorkspaceAgent struct {
|
||||
@@ -53,7 +54,9 @@ type WorkspaceAgent struct {
|
||||
Version string `json:"version"`
|
||||
Apps []WorkspaceApp `json:"apps"`
|
||||
// DERPLatency is mapped by region name (e.g. "New York City", "Seattle").
|
||||
DERPLatency map[string]DERPRegion `json:"latency,omitempty"`
|
||||
DERPLatency map[string]DERPRegion `json:"latency,omitempty"`
|
||||
ConnectionTimeoutSeconds int32 `json:"connection_timeout_seconds"`
|
||||
TroubleshootingURL string `json:"troubleshooting_url,omitempty"`
|
||||
}
|
||||
|
||||
type WorkspaceAgentResourceMetadata struct {
|
||||
|
||||
Reference in New Issue
Block a user