confs.proto 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. syntax = "proto3";
  2. package protos;
  3. import "structs.proto";
  4. // 项目中配置文件定义
  5. message ZkConf {
  6. repeated string addrs = 1;
  7. string username = 2;
  8. string password = 3;
  9. int32 timeout = 4;
  10. }
  11. message RedisConf {
  12. repeated string addrs = 1;
  13. string password = 2;
  14. int32 db = 3;
  15. }
  16. message NatsConf {
  17. repeated string addrs = 1;
  18. string username = 2;
  19. string password = 3;
  20. string clusterId = 4;
  21. }
  22. message AgentConf {
  23. ZkConf zoo = 1;
  24. string namespace = 2;
  25. uint64 id = 3;
  26. string addr = 4;
  27. string rpcAddr = 5;
  28. string profileAddr = 6;
  29. string agentAddr = 7;
  30. string logPath = 8;
  31. int32 level = 9;
  32. string mode = 10;
  33. }
  34. // zk 中 login 配置
  35. message LoginZkConf {
  36. repeated string addrs = 1;
  37. string password = 2;
  38. }
  39. message LoginConf {
  40. uint64 id = 1;
  41. RedisConf redis = 2;
  42. NatsConf nats = 3;
  43. string addr = 4;
  44. string agentAddr = 5;
  45. string rpcAddr = 6;
  46. string logPath = 10;
  47. int32 level = 11;
  48. string mode = 12;
  49. }
  50. message ManagerConf {
  51. ZkConf zoo = 1;
  52. string namespace = 2;
  53. uint64 id = 3;
  54. string addr = 4;
  55. string profileAddr = 6;
  56. string logPath = 8;
  57. int32 level = 9;
  58. string mode = 10;
  59. }
  60. message LogicConf {
  61. ZkConf zoo = 1;
  62. string namespace = 2;
  63. uint64 id = 3;
  64. string addr = 4;
  65. string rpcAddr = 5;
  66. string profileAddr = 6;
  67. string agentAddr = 7;
  68. string logPath = 8;
  69. int32 level = 9;
  70. string mode = 10;
  71. }
  72. message RouteRule_ {
  73. uint64 funcId = 1;
  74. Int32Scope scope = 2;
  75. }
  76. // 路由规则配置
  77. message RouteRules {
  78. repeated RouteRule_ rules = 1;
  79. }