浏览代码

continue devlopment

yokyo 5 年之前
父节点
当前提交
612344ede8
共有 4 个文件被更改,包括 83 次插入9 次删除
  1. 69 0
      confs.proto
  2. 7 9
      login_internal.proto
  3. 3 0
      manager.proto
  4. 4 0
      msgq.proto

+ 69 - 0
confs.proto

@@ -0,0 +1,69 @@
+syntax = "proto3";
+package protos;
+
+
+// 项目中配置文件定义
+
+message ZkConf {
+    repeated string addrs   = 1;
+    string username         = 2;
+    string password         = 3;
+    int timeout             = 4;
+}
+
+message RedisConf {
+    repeated string addrs   = 1;
+    string password         = 2;
+    int db                  = 3;
+}
+
+message NatsConf {
+    repeated string addrs   = 1;
+    string username         = 2;
+    string password         = 3;
+    string clusterId        = 4;
+}
+
+message AgentConf {
+    ZkConf zoo          = 1;
+    string namespace    = 2;
+    uint64 id           = 3;
+    string addr         = 4;
+    string rpcAddr      = 5;
+    string profileAddr  = 6;
+    string agentAddr    = 7;
+    string logPath      = 8;
+    int level           = 9;
+    string mode         = 10;
+}
+
+message LoginConf {
+    RedisConf redis     = 1;
+    NatsConf nats       = 2;
+    string addr         = 3;
+    string agentAddr    = 4;
+}
+
+message ManagerConf {
+    ZkConf zoo          = 1;
+    string namespace    = 2;
+    uint64 id           = 3;
+    string addr         = 4;
+    string profileAddr  = 6;
+    string logPath      = 8;
+    int level           = 9;
+    string mode         = 10;
+}
+
+message LogicConf {
+    ZkConf zoo          = 1;
+    string namespace    = 2;
+    uint64 id           = 3;
+    string addr         = 4;
+    string rpcAddr      = 5;
+    string profileAddr  = 6;
+    string agentAddr    = 7;
+    string logPath      = 8;
+    int level           = 9;
+    string mode         = 10;
+}

+ 7 - 9
login_internal.proto

@@ -3,27 +3,26 @@ package protos;
 
 
 /// 逻辑服务器报告状态作为心跳
-message SL_Status {
+message StatusParams {
     int32 active    = 1;
     int32 support   = 2;
     int64 ts        = 4;
     int32 priority  = 8;
 }
 
-message LS_Status {
-    int32 reserved = 1;
+message StatusResult {
+    int64 ts        = 1;
 }
 
 
 /// 用户更新密码后需要通知登录服务器
 /// 失败必须重试,如果重试失败需要记录日志手动修改
-message SL_UpdatePassword {
+message UpdatePasswordParams {
     int64 guid      = 1;
     string password = 2;
 }
 
-message LS_UpdatePassword {
-    int32 ec    = 1;
+message UpdatePasswordResult {
 }
 
 
@@ -31,13 +30,12 @@ message LS_UpdatePassword {
 /// 登录服务器的返回 guid, token 必须和请求一致,
 /// 登录服务器可以续租, 但不可更新 token
 
-message SL_Verify {
+message VerifyParams {
     int64  guid     = 1;
     string token    = 2;
 }
 
-message LS_Verify {
-    int32 ec        = 1;
+message VerifyResult {
     int64 guid      = 2;
     string token    = 4;
     string email    = 8;

+ 3 - 0
manager.proto

@@ -0,0 +1,3 @@
+syntax="proto3";
+package protos;
+

+ 4 - 0
msgq.proto

@@ -0,0 +1,4 @@
+syntax="proto3";
+package protos;
+
+