confs.proto 2.0 KB

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