mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
feat(agent/agentcontainers): add devcontainers list endpoint (#17389)
This change allows listing both predefined and runtime-detected devcontainers, as well as showing whether or not the devcontainer is running and which container represents it. Fixes coder/internal#478
This commit is contained in:
committed by
GitHub
parent
c8c4de5f7a
commit
00b5f56734
@ -392,6 +392,12 @@ func (c *Client) WorkspaceAgentListeningPorts(ctx context.Context, agentID uuid.
|
||||
return listeningPorts, json.NewDecoder(res.Body).Decode(&listeningPorts)
|
||||
}
|
||||
|
||||
// WorkspaceAgentDevcontainersResponse is the response to the devcontainers
|
||||
// request.
|
||||
type WorkspaceAgentDevcontainersResponse struct {
|
||||
Devcontainers []WorkspaceAgentDevcontainer `json:"devcontainers"`
|
||||
}
|
||||
|
||||
// WorkspaceAgentDevcontainer defines the location of a devcontainer
|
||||
// configuration in a workspace that is visible to the workspace agent.
|
||||
type WorkspaceAgentDevcontainer struct {
|
||||
@ -399,6 +405,10 @@ type WorkspaceAgentDevcontainer struct {
|
||||
Name string `json:"name"`
|
||||
WorkspaceFolder string `json:"workspace_folder"`
|
||||
ConfigPath string `json:"config_path,omitempty"`
|
||||
|
||||
// Additional runtime fields.
|
||||
Running bool `json:"running"`
|
||||
Container *WorkspaceAgentContainer `json:"container,omitempty"`
|
||||
}
|
||||
|
||||
// WorkspaceAgentContainer describes a devcontainer of some sort
|
||||
|
Reference in New Issue
Block a user