mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-21 10:10:24 +08:00
智能DNS初步支持搜索引擎线路
This commit is contained in:
12
pkg/rpc/protos/models/model_client_agent.proto
Normal file
12
pkg/rpc/protos/models/model_client_agent.proto
Normal file
@@ -0,0 +1,12 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
message ClientAgent {
|
||||
int64 id = 1;
|
||||
string name = 2;
|
||||
string code = 3;
|
||||
string description = 4;
|
||||
int64 countIPs = 5;
|
||||
}
|
||||
14
pkg/rpc/protos/models/model_client_agent_ip.proto
Normal file
14
pkg/rpc/protos/models/model_client_agent_ip.proto
Normal file
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "models/model_client_agent.proto";
|
||||
|
||||
message ClientAgentIP {
|
||||
int64 id = 1;
|
||||
string ip = 2;
|
||||
string ptr = 3;
|
||||
|
||||
ClientAgent clientAgent = 30;
|
||||
}
|
||||
@@ -18,4 +18,5 @@ message NSCluster {
|
||||
bool autoRemoteStart = 9;
|
||||
string timeZone = 10;
|
||||
bytes answerJSON = 11;
|
||||
bool detectAgents = 14;
|
||||
}
|
||||
20
pkg/rpc/protos/service_client_agent.proto
Normal file
20
pkg/rpc/protos/service_client_agent.proto
Normal file
@@ -0,0 +1,20 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "models/model_client_agent.proto";
|
||||
|
||||
// Agent服务
|
||||
service ClientAgentService {
|
||||
// 查找所有Agent
|
||||
rpc findAllClientAgents(FindAllClientAgentsRequest) returns (FindAllClientAgentsResponse);
|
||||
}
|
||||
|
||||
// 查找所有Agent
|
||||
message FindAllClientAgentsRequest {
|
||||
}
|
||||
|
||||
message FindAllClientAgentsResponse {
|
||||
repeated ClientAgent clientAgents = 1;
|
||||
}
|
||||
37
pkg/rpc/protos/service_client_agent_ip.proto
Normal file
37
pkg/rpc/protos/service_client_agent_ip.proto
Normal file
@@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "models/rpc_messages.proto";
|
||||
import "models/model_client_agent_ip.proto";
|
||||
|
||||
// Agent IP服务
|
||||
service ClientAgentIPService {
|
||||
// 创建一组IP
|
||||
rpc createClientAgentIPs(CreateClientAgentIPsRequest) returns (RPCSuccess);
|
||||
|
||||
// 查询最新的IP
|
||||
rpc listClientAgentIPsAfterId(ListClientAgentIPsAfterIdRequest) returns (ListClientAgentIPsAfterIdResponse);
|
||||
}
|
||||
|
||||
// 创建一组IP
|
||||
message CreateClientAgentIPsRequest {
|
||||
repeated AgentIPInfo agentIPs = 1;
|
||||
|
||||
message AgentIPInfo {
|
||||
string agentCode = 1;
|
||||
string ip = 2;
|
||||
string ptr = 3;
|
||||
}
|
||||
}
|
||||
|
||||
// 查询最新的IP
|
||||
message ListClientAgentIPsAfterIdRequest {
|
||||
int64 id = 1;
|
||||
int64 size = 2;
|
||||
}
|
||||
|
||||
message ListClientAgentIPsAfterIdResponse {
|
||||
repeated ClientAgentIP clientAgentIPs = 1;
|
||||
}
|
||||
@@ -109,6 +109,7 @@ message UpdateNSClusterRequest {
|
||||
string email = 8;
|
||||
bool autoRemoteStart = 5;
|
||||
string timeZone = 6;
|
||||
bool detectAgents = 7;
|
||||
}
|
||||
|
||||
// 查找集群访问日志配置
|
||||
|
||||
@@ -44,6 +44,9 @@ service NSRouteService {
|
||||
|
||||
// 查找默认的ISP线路
|
||||
rpc findAllDefaultISPRoutes(FindAllDefaultISPRoutesRequest) returns (FindAllDefaultISPRoutesResponse);
|
||||
|
||||
// 查找默认的搜索引擎线路
|
||||
rpc findAllAgentNSRoutes(FindAllAgentNSRoutesRequest) returns (FindAllAgentNSRoutesResponse);
|
||||
}
|
||||
|
||||
// 创建自定义线路
|
||||
@@ -155,4 +158,13 @@ message FindAllDefaultISPRoutesRequest {
|
||||
|
||||
message FindAllDefaultISPRoutesResponse {
|
||||
repeated NSRoute nsRoutes = 1;
|
||||
}
|
||||
|
||||
// 查找默认的搜索引擎线路
|
||||
message FindAllAgentNSRoutesRequest {
|
||||
|
||||
}
|
||||
|
||||
message FindAllAgentNSRoutesResponse{
|
||||
repeated NSRoute nsRoutes = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user