2024-10-26 00:04:22 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
|
|
import "common.proto";
|
|
|
|
|
import "peer_rpc.proto";
|
|
|
|
|
import "cli.proto";
|
|
|
|
|
|
|
|
|
|
package web;
|
|
|
|
|
|
|
|
|
|
message MyNodeInfo {
|
|
|
|
|
common.Ipv4Addr virtual_ipv4 = 1;
|
|
|
|
|
string hostname = 2;
|
|
|
|
|
string version = 3;
|
|
|
|
|
peer_rpc.GetIpListResponse ips = 4;
|
|
|
|
|
common.StunInfo stun_info = 5;
|
|
|
|
|
repeated common.Url listeners = 6;
|
|
|
|
|
optional string vpn_portal_cfg = 7;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message NetworkInstanceRunningInfo {
|
|
|
|
|
string dev_name = 1;
|
|
|
|
|
MyNodeInfo my_node_info = 2;
|
|
|
|
|
map<string, string> events = 3;
|
|
|
|
|
MyNodeInfo node_info = 4;
|
|
|
|
|
repeated cli.Route routes = 5;
|
|
|
|
|
repeated cli.PeerInfo peers = 6;
|
|
|
|
|
repeated cli.PeerRoutePair peer_route_pairs = 7;
|
|
|
|
|
bool running = 8;
|
|
|
|
|
optional string error_msg = 9;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message NetworkInstanceRunningInfoMap {
|
|
|
|
|
map<string, NetworkInstanceRunningInfo> map = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message HeartbeatRequest {
|
|
|
|
|
common.UUID machine_id = 1;
|
|
|
|
|
common.UUID inst_id = 2;
|
|
|
|
|
string user_token = 3;
|
2024-11-02 15:13:19 +08:00
|
|
|
|
|
|
|
|
string easytier_version = 4;
|
|
|
|
|
string report_time = 5;
|
|
|
|
|
string hostname = 6;
|
|
|
|
|
|
|
|
|
|
repeated common.UUID running_network_instances = 7;
|
2024-10-26 00:04:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message HeartbeatResponse {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
service WebServerService {
|
|
|
|
|
rpc Heartbeat(HeartbeatRequest) returns (HeartbeatResponse) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ValidateConfigRequest {
|
|
|
|
|
string config = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ValidateConfigResponse {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RunNetworkInstanceRequest {
|
2024-11-02 15:13:19 +08:00
|
|
|
common.UUID inst_id = 1;
|
|
|
|
|
string config = 2;
|
2024-10-26 00:04:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RunNetworkInstanceResponse {
|
2024-11-02 15:13:19 +08:00
|
|
|
common.UUID inst_id = 1;
|
2024-10-26 00:04:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RetainNetworkInstanceRequest {
|
|
|
|
|
repeated common.UUID inst_ids = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message RetainNetworkInstanceResponse {
|
|
|
|
|
repeated common.UUID remain_inst_ids = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message CollectNetworkInfoRequest {
|
|
|
|
|
repeated common.UUID inst_ids = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message CollectNetworkInfoResponse {
|
|
|
|
|
NetworkInstanceRunningInfoMap info = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ListNetworkInstanceRequest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ListNetworkInstanceResponse {
|
|
|
|
|
repeated common.UUID inst_ids = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message DeleteNetworkInstanceRequest {
|
|
|
|
|
repeated common.UUID inst_ids = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message DeleteNetworkInstanceResponse {
|
|
|
|
|
repeated common.UUID remain_inst_ids = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
service WebClientService {
|
|
|
|
|
rpc ValidateConfig(ValidateConfigRequest) returns (ValidateConfigResponse) {}
|
|
|
|
|
rpc RunNetworkInstance(RunNetworkInstanceRequest) returns (RunNetworkInstanceResponse) {}
|
|
|
|
|
rpc RetainNetworkInstance(RetainNetworkInstanceRequest) returns (RetainNetworkInstanceResponse) {}
|
|
|
|
|
rpc CollectNetworkInfo(CollectNetworkInfoRequest) returns (CollectNetworkInfoResponse) {}
|
|
|
|
|
rpc ListNetworkInstance(ListNetworkInstanceRequest) returns (ListNetworkInstanceResponse) {}
|
|
|
|
|
rpc DeleteNetworkInstance(DeleteNetworkInstanceRequest) returns (DeleteNetworkInstanceResponse) {}
|
|
|
|
|
}
|