Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67a85b9

Browse files
committed
workspaceagents.go in progress
1 parent fc00d7e commit 67a85b9

File tree

5 files changed

+719
-1
lines changed

5 files changed

+719
-1
lines changed

coderd/apidoc/docs.go

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,83 @@ const docTemplate = `{
983983
}
984984
}
985985
},
986+
"/workspaceagents/me/app-health": {
987+
"post": {
988+
"security": [
989+
{
990+
"CoderSessionToken": []
991+
}
992+
],
993+
"produces": [
994+
"application/json"
995+
],
996+
"tags": [
997+
"Agents"
998+
],
999+
"summary": "Submit workspace application health",
1000+
"operationId": "submit-workspace-workspace-agent-health",
1001+
"parameters": [
1002+
{
1003+
"description": "Application health request",
1004+
"name": "request",
1005+
"in": "body",
1006+
"required": true,
1007+
"schema": {
1008+
"$ref": "#/definitions/codersdk.PostWorkspaceAppHealthsRequest"
1009+
}
1010+
}
1011+
],
1012+
"responses": {
1013+
"200": {
1014+
"description": "OK"
1015+
}
1016+
}
1017+
}
1018+
},
1019+
"/workspaceagents/me/gitauth": {
1020+
"get": {
1021+
"security": [
1022+
{
1023+
"CoderSessionToken": []
1024+
}
1025+
],
1026+
"consumes": [
1027+
"application/json"
1028+
],
1029+
"produces": [
1030+
"application/json"
1031+
],
1032+
"tags": [
1033+
"Agents"
1034+
],
1035+
"summary": "Get workspace agent Git auth",
1036+
"operationId": "get-workspace-agent-git-auth",
1037+
"parameters": [
1038+
{
1039+
"type": "string",
1040+
"format": "uri",
1041+
"description": "Git URL",
1042+
"name": "url",
1043+
"in": "query",
1044+
"required": true
1045+
},
1046+
{
1047+
"type": "boolean",
1048+
"description": "Wait for a new token to be issued",
1049+
"name": "listen",
1050+
"in": "query"
1051+
}
1052+
],
1053+
"responses": {
1054+
"200": {
1055+
"description": "OK",
1056+
"schema": {
1057+
"$ref": "#/definitions/codersdk.WorkspaceAgentGitAuthResponse"
1058+
}
1059+
}
1060+
}
1061+
}
1062+
},
9861063
"/workspaceagents/me/metadata": {
9871064
"get": {
9881065
"security": [
@@ -1011,6 +1088,75 @@ const docTemplate = `{
10111088
}
10121089
}
10131090
},
1091+
"/workspaceagents/me/report-stats": {
1092+
"post": {
1093+
"security": [
1094+
{
1095+
"CoderSessionToken": []
1096+
}
1097+
],
1098+
"produces": [
1099+
"application/json"
1100+
],
1101+
"tags": [
1102+
"Agents"
1103+
],
1104+
"summary": "Submit workspace agent stats",
1105+
"operationId": "submit-workspace-workspace-agent-stats",
1106+
"parameters": [
1107+
{
1108+
"description": "Stats request",
1109+
"name": "request",
1110+
"in": "body",
1111+
"required": true,
1112+
"schema": {
1113+
"$ref": "#/definitions/codersdk.AgentStats"
1114+
}
1115+
}
1116+
],
1117+
"responses": {
1118+
"200": {
1119+
"description": "OK",
1120+
"schema": {
1121+
"$ref": "#/definitions/codersdk.AgentStatsResponse"
1122+
}
1123+
}
1124+
}
1125+
}
1126+
},
1127+
"/workspaceagents/me/version": {
1128+
"post": {
1129+
"security": [
1130+
{
1131+
"CoderSessionToken": []
1132+
}
1133+
],
1134+
"produces": [
1135+
"application/json"
1136+
],
1137+
"tags": [
1138+
"Agents"
1139+
],
1140+
"summary": "Submit workspace agent version",
1141+
"operationId": "submit-workspace-workspace-agent-version",
1142+
"parameters": [
1143+
{
1144+
"description": "Version request",
1145+
"name": "request",
1146+
"in": "body",
1147+
"required": true,
1148+
"schema": {
1149+
"$ref": "#/definitions/codersdk.PostWorkspaceAgentVersionRequest"
1150+
}
1151+
}
1152+
],
1153+
"responses": {
1154+
"200": {
1155+
"description": "OK"
1156+
}
1157+
}
1158+
}
1159+
},
10141160
"/workspacebuilds/{workspacebuild}": {
10151161
"get": {
10161162
"security": [
@@ -1560,6 +1706,47 @@ const docTemplate = `{
15601706
}
15611707
}
15621708
},
1709+
"codersdk.AgentStats": {
1710+
"type": "object",
1711+
"properties": {
1712+
"conns_by_proto": {
1713+
"description": "ConnsByProto is a count of connections by protocol.",
1714+
"type": "object",
1715+
"additionalProperties": {
1716+
"type": "integer"
1717+
}
1718+
},
1719+
"num_comms": {
1720+
"description": "NumConns is the number of connections received by an agent.",
1721+
"type": "integer"
1722+
},
1723+
"rx_bytes": {
1724+
"description": "RxBytes is the number of received bytes.",
1725+
"type": "integer"
1726+
},
1727+
"rx_packets": {
1728+
"description": "RxPackets is the number of received packets.",
1729+
"type": "integer"
1730+
},
1731+
"tx_bytes": {
1732+
"description": "TxBytes is the number of transmitted bytes.",
1733+
"type": "integer"
1734+
},
1735+
"tx_packets": {
1736+
"description": "TxPackets is the number of transmitted bytes.",
1737+
"type": "integer"
1738+
}
1739+
}
1740+
},
1741+
"codersdk.AgentStatsResponse": {
1742+
"type": "object",
1743+
"properties": {
1744+
"report_interval": {
1745+
"description": "ReportInterval is the duration after which the agent should send stats\nagain.",
1746+
"type": "integer"
1747+
}
1748+
}
1749+
},
15631750
"codersdk.AuditDiff": {
15641751
"type": "object",
15651752
"additionalProperties": {
@@ -2395,6 +2582,26 @@ const docTemplate = `{
23952582
}
23962583
}
23972584
},
2585+
"codersdk.PostWorkspaceAgentVersionRequest": {
2586+
"type": "object",
2587+
"properties": {
2588+
"version": {
2589+
"type": "string"
2590+
}
2591+
}
2592+
},
2593+
"codersdk.PostWorkspaceAppHealthsRequest": {
2594+
"type": "object",
2595+
"properties": {
2596+
"healths": {
2597+
"description": "Healths is a map of the workspace app name and the health of the app.",
2598+
"type": "object",
2599+
"additionalProperties": {
2600+
"type": "string"
2601+
}
2602+
}
2603+
}
2604+
},
23982605
"codersdk.PprofConfig": {
23992606
"type": "object",
24002607
"properties": {
@@ -2975,6 +3182,20 @@ const docTemplate = `{
29753182
}
29763183
}
29773184
},
3185+
"codersdk.WorkspaceAgentGitAuthResponse": {
3186+
"type": "object",
3187+
"properties": {
3188+
"password": {
3189+
"type": "string"
3190+
},
3191+
"url": {
3192+
"type": "string"
3193+
},
3194+
"username": {
3195+
"type": "string"
3196+
}
3197+
}
3198+
},
29783199
"codersdk.WorkspaceAgentMetadata": {
29793200
"type": "object",
29803201
"properties": {

0 commit comments

Comments
 (0)