conf.proto 757 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. syntax = "proto3";
  2. package kratos.api;
  3. option go_package = "server/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. HTTP http = 1;
  21. GRPC grpc = 2;
  22. }
  23. message Data {
  24. message Database {
  25. string driver = 1;
  26. string source = 2;
  27. }
  28. message Redis {
  29. string network = 1;
  30. string addr = 2;
  31. google.protobuf.Duration read_timeout = 3;
  32. google.protobuf.Duration write_timeout = 4;
  33. }
  34. Database database = 1;
  35. Redis redis = 2;
  36. }