mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-09 18:42:26 +08:00
添加了节点服务器,各个服务器之间支持多对多
This commit is contained in:
34
node/api/api.proto
Normal file
34
node/api/api.proto
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user