添加了节点服务器,各个服务器之间支持多对多

This commit is contained in:
flswld
2022-12-24 04:14:33 +08:00
parent 16dd9c1e87
commit 7e86669628
92 changed files with 1429 additions and 287 deletions

34
node/api/api.proto Normal file
View File

@@ -0,0 +1,34 @@
syntax = "proto3";
package node.api;
option go_package = "hk4e/node/api;api";
// 节点服务器注册发现服务
service Discovery {
rpc RegisterServer (RegisterServerReq) returns (RegisterServerRsp) {} // 服务器启动注册获取appid
rpc GetServerAppId (GetServerAppIdReq) returns (GetServerAppIdRsp) {} // 随机获取某服务器的appid
rpc GetRegionEc2b (NullMsg) returns (RegionEc2b) {} // 获取区服密钥信息
}
message NullMsg {
}
message GetServerAppIdReq {
string server_type = 1;
}
message GetServerAppIdRsp {
string app_id = 1;
}
message RegisterServerReq {
string server_type = 1;
}
message RegisterServerRsp {
string app_id = 1;
}
message RegionEc2b {
bytes data = 1;
}