| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- syntax = "proto3";
- package protos;
- import "structs.proto";
- // 项目中配置文件定义
- message LogConf {
- string path = 1;
- string level = 2;
- }
- // zookeeper/etcd 连接配置
- message ConfConf {
- repeated string addrs = 1;
- string username = 2;
- string password = 3;
- int32 timeout = 4;
- }
- // redis 连接配置
- message RedisConf {
- repeated string addrs = 1;
- string password = 2;
- int32 db = 3;
- }
- // nats(-streaming) 连接配置
- message NatsConf {
- repeated string addrs = 1;
- string username = 2;
- string password = 3;
- string clusterId = 4;
- }
- // agent 服务器配置
- message AgentConf {
- ConfConf zoo = 1;
- string namespace = 2;
- uint64 id = 3;
- string addr = 4;
- string rpcAddr = 5;
- string profileAddr = 6;
- string agentAddr = 7;
- LogConf log = 8;
- string mode = 10;
- }
- // zk 中 login 配置
- message LoginConfConf {
- repeated string addrs = 1;
- string password = 2;
- }
- // login 服务器启动配置
- // 因为 login 不在 zookeeper 中注册服务,所以 login 有两个配置
- message LoginConf {
- uint64 id = 1;
- RedisConf redis = 2;
- NatsConf nats = 3;
- repeated EmailConf emails = 4;
- string addr = 5;
- string agentAddr = 7;
- string rpcAddr = 9;
- string key = 11;
- LogConf log = 12;
- string mode = 16;
- }
- message ManagerConf {
- ConfConf zoo = 1;
- string namespace = 2;
- uint64 id = 3;
- string addr = 4;
- string profileAddr = 6;
- LogConf log = 7;
- string mode = 10;
- }
- message LogicConf {
- ConfConf zoo = 1;
- string namespace = 2;
- uint64 id = 3;
- string addr = 4;
- string rpcAddr = 5;
- string profileAddr = 6;
- string externalAddr = 7;
- LogConf log = 8;
- string mode = 10;
- }
- // smtp 服务器配置
- message EmailConf {
- string smtp = 1;
- int32 port = 2;
- string username = 3;
- string password = 4;
- string crypto = 5;
- string sujectTpl = 11;
- string bodyTpl = 12;
- }
|