conf.proto 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. syntax = "proto3";
  2. package kratos.api;
  3. option go_package = "w303a/server/app/gate/internal/conf;conf";
  4. import "google/protobuf/duration.proto";
  5. message Bootstrap {
  6. Server server = 1;
  7. Data data = 2;
  8. }
  9. message Server {
  10. message HTTP {
  11. string network = 1;
  12. string addr = 2;
  13. google.protobuf.Duration timeout = 3;
  14. }
  15. message GRPC {
  16. string network = 1;
  17. string addr = 2;
  18. google.protobuf.Duration timeout = 3;
  19. }
  20. message Websocket {
  21. string network = 1;
  22. string addr = 2;
  23. google.protobuf.Duration keepalive = 3;
  24. google.protobuf.Duration writeTimeout = 4;
  25. }
  26. message Registry {
  27. message Etcd {
  28. repeated string endpoints = 1;
  29. }
  30. Etcd etcd = 1;
  31. }
  32. message Logger {
  33. string output = 1;
  34. int32 max_size = 2;
  35. int32 max_backups = 3;
  36. int32 max_age = 4;
  37. bool compress = 5;
  38. }
  39. HTTP http = 1;
  40. GRPC grpc = 2;
  41. Websocket websocket = 3;
  42. Registry registry = 4;
  43. Logger logger = 5;
  44. }
  45. message Data {
  46. message Database {
  47. string driver = 1;
  48. string source = 2;
  49. }
  50. message Redis {
  51. string network = 1;
  52. string addr = 2;
  53. string password = 3;
  54. google.protobuf.Duration read_timeout = 4;
  55. google.protobuf.Duration write_timeout = 5;
  56. }
  57. message Mongo {
  58. string addr = 1;
  59. string database = 2;
  60. }
  61. message RabbitMq {
  62. string addr = 1;
  63. string queue = 2;
  64. string serverId = 3;
  65. }
  66. Database database = 1;
  67. Redis redis = 2;
  68. Mongo mongo = 3;
  69. RabbitMq rabbit_mq = 5;
  70. }