conf.proto 725 Bytes
Newer Older
彭芳 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
syntax = "proto3";
package kratos.api;

option go_package = "demo/internal/conf;conf";

import "google/protobuf/duration.proto";

message Bootstrap {
  Server server = 1;
  Data data = 2;
}

message Server {
  message HTTP {
    string network = 1;
    string addr = 2;
    google.protobuf.Duration timeout = 3;
  }
  HTTP http = 1;
}

message Data {
  message Database {
    string driver = 1;
    string source = 2;
彭芳 committed
26 27 28
    int64 max_idle = 3;
    int64 max_open = 4;
    google.protobuf.Duration max_lifetime = 5;
彭芳 committed
29 30 31 32 33 34 35 36 37 38
  }
  message Redis {
    string network = 1;
    string addr = 2;
    google.protobuf.Duration read_timeout = 3;
    google.protobuf.Duration write_timeout = 4;
  }
  Database database = 1;
  Redis redis = 2;
}