mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore(codersdk): rename WorkspaceAgent(Dev)container structs (#16996)
This is to free up the devcontainer name space for more targeted structs. Updates #16423
This commit is contained in:
committed by
GitHub
parent
ef62e626c8
commit
3ac844ad3d
@ -392,11 +392,11 @@ func (c *Client) WorkspaceAgentListeningPorts(ctx context.Context, agentID uuid.
|
||||
return listeningPorts, json.NewDecoder(res.Body).Decode(&listeningPorts)
|
||||
}
|
||||
|
||||
// WorkspaceAgentDevcontainer describes a devcontainer of some sort
|
||||
// WorkspaceAgentContainer describes a devcontainer of some sort
|
||||
// that is visible to the workspace agent. This struct is an abstraction
|
||||
// of potentially multiple implementations, and the fields will be
|
||||
// somewhat implementation-dependent.
|
||||
type WorkspaceAgentDevcontainer struct {
|
||||
type WorkspaceAgentContainer struct {
|
||||
// CreatedAt is the time the container was created.
|
||||
CreatedAt time.Time `json:"created_at" format:"date-time"`
|
||||
// ID is the unique identifier of the container.
|
||||
@ -410,7 +410,7 @@ type WorkspaceAgentDevcontainer struct {
|
||||
// Running is true if the container is currently running.
|
||||
Running bool `json:"running"`
|
||||
// Ports includes ports exposed by the container.
|
||||
Ports []WorkspaceAgentDevcontainerPort `json:"ports"`
|
||||
Ports []WorkspaceAgentContainerPort `json:"ports"`
|
||||
// Status is the current status of the container. This is somewhat
|
||||
// implementation-dependent, but should generally be a human-readable
|
||||
// string.
|
||||
@ -420,8 +420,8 @@ type WorkspaceAgentDevcontainer struct {
|
||||
Volumes map[string]string `json:"volumes"`
|
||||
}
|
||||
|
||||
// WorkspaceAgentDevcontainerPort describes a port as exposed by a container.
|
||||
type WorkspaceAgentDevcontainerPort struct {
|
||||
// WorkspaceAgentContainerPort describes a port as exposed by a container.
|
||||
type WorkspaceAgentContainerPort struct {
|
||||
// Port is the port number *inside* the container.
|
||||
Port uint16 `json:"port"`
|
||||
// Network is the network protocol used by the port (tcp, udp, etc).
|
||||
@ -437,7 +437,7 @@ type WorkspaceAgentDevcontainerPort struct {
|
||||
// request.
|
||||
type WorkspaceAgentListContainersResponse struct {
|
||||
// Containers is a list of containers visible to the workspace agent.
|
||||
Containers []WorkspaceAgentDevcontainer `json:"containers"`
|
||||
Containers []WorkspaceAgentContainer `json:"containers"`
|
||||
// Warnings is a list of warnings that may have occurred during the
|
||||
// process of listing containers. This should not include fatal errors.
|
||||
Warnings []string `json:"warnings,omitempty"`
|
||||
|
Reference in New Issue
Block a user