Skip to content

Commit

Permalink
expand register structs
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Rash <jordan@synadia.com>
  • Loading branch information
jordan-rash committed Jan 7, 2025
1 parent 310b26d commit 71f3358
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 33 deletions.
45 changes: 42 additions & 3 deletions api/go/agent.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 32 additions & 23 deletions api/register-agent-request.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "io.nats.nex.v2.agent_register_request",
"title": "RegisterAgentRequest",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the agent"
},
"description": {
"type": "string",
"description": "A user friendly description of the agent"
},
"version": {
"type": "string",
"description": "Version of the agent"
},
"max_workloads": {
"type": "number",
"description": "The maximum number of workloads this agent can hold. 0 indicates unlimited"
}
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "io.nats.nex.v2.agent_register_request",
"title": "RegisterAgentRequest",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the agent"
},
"required": ["name", "version"],
"additionalProperties": false
"description": {
"type": "string",
"description": "A user friendly description of the agent"
},
"version": {
"type": "string",
"description": "Version of the agent"
},
"max_workloads": {
"type": "number",
"description": "The maximum number of workloads this agent can hold. 0 indicates unlimited"
},
"public_xkey": {
"type": "string",
"description": "The public xkey of the agent. Node will encrypt environment with this key"
}
},
"required": [
"name",
"version",
"description",
"max_workloads",
"public_xkey"
]
}
25 changes: 18 additions & 7 deletions api/register-agent-response.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "io.nats.nex.v2.agent_register_response",
"title": "RegisterAgentResponse",
"type": "object",
"properties": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "io.nats.nex.v2.agent_register_response",
"title": "RegisterAgentResponse",
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Indicates if the agent was successfully registered"
},
"required": [],
"additionalProperties": false
"message": {
"type": "string",
"description": "A message indicating the result of the registration"
}
},
"required": [
"success",
"message"
],
"additionalProperties": false
}

0 comments on commit 71f3358

Please sign in to comment.