confs.proto 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 logPath = 6;
  46. int32 level = 7;
  47. string mode = 8;
  48. }
  49. message ManagerConf {
  50. ZkConf zoo = 1;
  51. string namespace = 2;
  52. uint64 id = 3;
  53. string addr = 4;
  54. string profileAddr = 6;
  55. string logPath = 8;
  56. int32 level = 9;
  57. string mode = 10;
  58. }
  59. message LogicConf {
  60. ZkConf zoo = 1;
  61. string namespace = 2;
  62. uint64 id = 3;
  63. string addr = 4;
  64. string rpcAddr = 5;
  65. string profileAddr = 6;
  66. string agentAddr = 7;
  67. string logPath = 8;
  68. int32 level = 9;
  69. string mode = 10;
  70. }
  71. message RouteRule_ {
  72. uint64 funcId = 1;
  73. Int32Scope scope = 2;
  74. }
  75. // 路由规则配置
  76. message RouteRules {
  77. repeated RouteRule_ rules = 1;
  78. }