Skip to content

Commit

Permalink
update agent protocol to support auto mode (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelquigley committed Nov 7, 2024
1 parent bf6f795 commit 3f8e760
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 157 deletions.
351 changes: 196 additions & 155 deletions agent/agentGrpc/agent.pb.go

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion agent/agentGrpc/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ message AccessPrivateResponse{
message AccessPrivateRequest{
string token = 1;
string bindAddress = 2;
repeated string responseHeaders = 3;
bool autoMode = 3;
string autoAddress = 4;
uint32 autoStartPort = 5;
uint32 autoEndPort = 6;
repeated string responseHeaders = 7;
}

message ReleaseAccessRequest {
Expand Down
26 changes: 26 additions & 0 deletions agent/agentGrpc/agent.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,32 @@
"required": false,
"type": "string"
},
{
"name": "autoMode",
"in": "query",
"required": false,
"type": "boolean"
},
{
"name": "autoAddress",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "autoStartPort",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "autoEndPort",
"in": "query",
"required": false,
"type": "integer",
"format": "int64"
},
{
"name": "responseHeaders",
"in": "query",
Expand Down
4 changes: 4 additions & 0 deletions agent/agentUi/src/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ var api = new AgentagentGrpcagentproto.AgentApi()
var opts = {
'token': "token_example", // {String}
'bindAddress': "bindAddress_example", // {String}
'autoMode': true, // {Boolean}
'autoAddress': "autoAddress_example", // {String}
'autoStartPort': 789, // {Number}
'autoEndPort': 789, // {Number}
'responseHeaders': ["responseHeaders_example"] // {[String]}
};
var callback = function(error, data, response) {
Expand Down
8 changes: 8 additions & 0 deletions agent/agentUi/src/api/docs/AgentApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ let apiInstance = new AgentagentGrpcagentproto.AgentApi();
let opts = {
'token': "token_example", // String |
'bindAddress': "bindAddress_example", // String |
'autoMode': true, // Boolean |
'autoAddress': "autoAddress_example", // String |
'autoStartPort': 789, // Number |
'autoEndPort': 789, // Number |
'responseHeaders': ["responseHeaders_example"] // [String] |
};
apiInstance.agentAccessPrivate(opts, (error, data, response) => {
Expand All @@ -43,6 +47,10 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**token** | **String**| | [optional]
**bindAddress** | **String**| | [optional]
**autoMode** | **Boolean**| | [optional]
**autoAddress** | **String**| | [optional]
**autoStartPort** | **Number**| | [optional]
**autoEndPort** | **Number**| | [optional]
**responseHeaders** | [**[String]**](String.md)| | [optional]

### Return type
Expand Down
6 changes: 5 additions & 1 deletion agent/agentUi/src/api/src/api/AgentApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export class AgentApi {
* @param {Object} opts Optional parameters
* @param {String} opts.token
* @param {String} opts.bindAddress
* @param {Boolean} opts.autoMode
* @param {String} opts.autoAddress
* @param {Number} opts.autoStartPort
* @param {Number} opts.autoEndPort
* @param {Array.<String>} opts.responseHeaders
* @param {module:api/AgentApi~agentAccessPrivateCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
Expand All @@ -65,7 +69,7 @@ export class AgentApi {

};
let queryParams = {
'token': opts['token'],'bindAddress': opts['bindAddress'],'responseHeaders': this.apiClient.buildCollectionParam(opts['responseHeaders'], 'multi')
'token': opts['token'],'bindAddress': opts['bindAddress'],'autoMode': opts['autoMode'],'autoAddress': opts['autoAddress'],'autoStartPort': opts['autoStartPort'],'autoEndPort': opts['autoEndPort'],'responseHeaders': this.apiClient.buildCollectionParam(opts['responseHeaders'], 'multi')
};
let headerParams = {

Expand Down

0 comments on commit 3f8e760

Please sign in to comment.