conf.proto 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. syntax = "proto3";
  2. package kratos.api;
  3. option go_package = "github.com/go-kratos/kratos-layout/internal/conf;conf";
  4. import "google/protobuf/duration.proto";
  5. message Startup {
  6. string namespace = 1;
  7. string group = 2;
  8. string name = 3;
  9. string configSource = 4;
  10. string registryType = 5;
  11. string version = 6;
  12. string flagConf = 7;
  13. }
  14. message Bootstrap {
  15. Server server = 1;
  16. Data data = 2;
  17. TraceConf traceConf = 4;
  18. }
  19. message TraceConf {
  20. string endpoint = 1;
  21. string env = 2;
  22. }
  23. message Server {
  24. HTTP http = 1;
  25. GRPC grpc = 2;
  26. Registrar registrar = 3;
  27. }
  28. message HTTP {
  29. string network = 1;
  30. string addr = 2;
  31. google.protobuf.Duration timeout = 3;
  32. }
  33. message GRPC {
  34. string network = 1;
  35. string addr = 2;
  36. google.protobuf.Duration timeout = 3;
  37. }
  38. message Registrar {
  39. string namespace = 1;
  40. string group = 2;
  41. string endpoint = 3;
  42. string data = 4;
  43. }
  44. message Data {
  45. Database database = 1;
  46. Redis redis = 2;
  47. Mongo mongo = 3;
  48. }
  49. message Database {
  50. string driver = 1;
  51. string source = 2;
  52. int32 maxIdleConns = 3;
  53. int32 maxOpenConns = 4;
  54. }
  55. message Redis {
  56. string network = 1;
  57. string addr = 2;
  58. int32 db = 3;
  59. google.protobuf.Duration dial_timeout = 4;
  60. google.protobuf.Duration read_timeout = 5;
  61. google.protobuf.Duration write_timeout = 6;
  62. int32 poolSize = 7;
  63. int32 minIdleConns = 8;
  64. }
  65. message Mongo {
  66. string uri = 1;
  67. string database = 2;
  68. }