conf.proto 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 Bootstrap {
  6. Server server = 1;
  7. Data data = 2;
  8. TraceConf traceConf = 4;
  9. }
  10. message TraceConf {
  11. string endpoint = 1;
  12. string env = 2;
  13. }
  14. message Server {
  15. message HTTP {
  16. string network = 1;
  17. string addr = 2;
  18. google.protobuf.Duration timeout = 3;
  19. }
  20. message GRPC {
  21. string network = 1;
  22. string addr = 2;
  23. google.protobuf.Duration timeout = 3;
  24. }
  25. message Registrar {
  26. string namespace = 1;
  27. string group = 2;
  28. string endpoint = 3;
  29. }
  30. HTTP http = 1;
  31. GRPC grpc = 2;
  32. Registrar registrar = 3;
  33. }
  34. message Data {
  35. message Database {
  36. string driver = 1;
  37. string source = 2;
  38. int32 maxIdleConns = 3;
  39. int32 maxOpenConns = 4;
  40. }
  41. message Redis {
  42. string network = 1;
  43. string addr = 2;
  44. int32 db = 3;
  45. google.protobuf.Duration dial_timeout = 4;
  46. google.protobuf.Duration read_timeout = 5;
  47. google.protobuf.Duration write_timeout = 6;
  48. int32 poolSize = 7;
  49. int32 minIdleConns = 8;
  50. }
  51. Database database = 1;
  52. Redis redis = 2;
  53. }