Files
kratos-bootstrap/api/protos/conf/v1/kratos_conf_data.proto
2024-06-08 14:09:29 +08:00

193 lines
5.3 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package conf;
option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf";
import "google/protobuf/duration.proto";
// 数据
message Data {
// 数据库
message Database {
string driver = 1; // 驱动名mysql、postgresql、mongodb、sqlite……
string source = 2; // 数据源DSN字符串
bool migrate = 10; // 数据迁移开关
bool debug = 11; // 调试开关
bool enable_trace = 12; // 链路追踪开关
bool enable_metrics = 13; // 性能分析开关
int32 max_idle_connections = 20; // 连接池最大空闲连接数
int32 max_open_connections = 21; // 连接池最大打开连接数
google.protobuf.Duration connection_max_lifetime = 22; // 连接可重用的最大时间长度
}
// redis
message Redis {
string network = 1; // 网络
string addr = 2; // 服务端地址
string password = 3; // 密码
int32 db = 4; // 数据库索引
google.protobuf.Duration dial_timeout = 5; // 连接超时时间
google.protobuf.Duration read_timeout = 6; // 读取超时时间
google.protobuf.Duration write_timeout = 7; // 写入超时时间
bool enable_tracing = 8; // 打开链路追踪
bool enable_metrics = 9; // 打开性能度量
}
// MongoDB
message MongoDB {
string address = 1;
string username = 2;
string password = 3;
}
// ClickHouse
message ClickHouse {
string address = 1;
string database = 2;
string username = 3;
string password = 4;
bool debug = 5;
string compression_method = 6;
google.protobuf.Duration dial_timeout = 7;
int32 max_execution_time = 8;
int32 max_open_conns = 9;
int32 max_idle_conns = 10;
google.protobuf.Duration conn_max_life_time = 11;
int32 block_buffer_size = 12;
int32 max_compression_buffer = 13;
string conn_open_strategy = 14;
int32 max_idle_connections = 15; // 连接池最大空闲连接数
int32 max_open_connections = 16; // 连接池最大打开连接数
google.protobuf.Duration connection_max_lifetime = 17; // 连接可重用的最大时间长度
string protocol = 18;
}
// InfluxDB
message InfluxDB {
string address = 1;
string token = 2;
string organization = 3;
string bucket = 4;
}
message Doris {
string address = 1;
}
message ElasticSearch {
repeated string addresses = 1;
string username = 2;
string password = 3;
bool enable_sniffer = 4;
bool enable_gzip = 5;
google.protobuf.Duration health_check_interval = 6;
}
message Cassandra {
string address = 1;
string username = 2;
string password = 3;
string keyspace = 5;
google.protobuf.Duration connect_timeout = 6;
google.protobuf.Duration timeout = 7;
uint32 consistency = 8;
bool disable_initial_host_lookup = 9;
bool ignore_peer_addr = 10;
}
message Snowflake {
}
// Kafka
message Kafka {
repeated string addrs = 1; // 对端网络地址
string codec = 2; // 编解码器
bool async = 3; // 异步发送
bool allow_auto_topic_creation = 4; // 允许发送的时候自动创建主题
int32 batch_size = 5; // 批量发送量
int64 batch_bytes = 6;// 批量发送字节数
google.protobuf.Duration batch_timeout = 7; // 批量发送超时时间
google.protobuf.Duration read_timeout = 8; // 读取超时时间
google.protobuf.Duration write_timeout = 9; // 发送超时时间
}
// RabbitMQ
message RabbitMQ {
repeated string addrs = 1; // 对端网络地址
}
// MQTT
message Mqtt {
string addr = 1; // 对端网络地址
}
message ActiveMQ {
string endpoint = 1; // 对端网络地址
string codec = 2; // 编解码器: json,xml,yaml...
}
message NATS {
string endpoint = 1; // 对端网络地址
string codec = 2; // 编解码器: json,xml,yaml...
}
message NSQ {
string endpoint = 1; // 对端网络地址
string codec = 2; // 编解码器: json,xml,yaml...
}
message Pulsar {
string endpoint = 1; // 对端网络地址
string codec = 2; // 编解码器: json,xml,yaml...
}
message RocketMQ {
string version = 1; // 驱动版本aliyun、v2、v5
string codec = 2; // 编解码器: json,xml,yaml...
bool enable_trace = 3;
repeated string name_servers = 4;
string name_server_domain = 5;
string access_key = 6;
string secret_key = 7;
string security_token = 8;
string namespace = 9;
string instance_name = 10;
string group_name = 11;
}
Database database = 1; // 数据库DSN
Redis redis = 10; // Redis
MongoDB mongodb = 11; // MongoDB数据库
ElasticSearch elastic_search = 12; // ElasticSearch数据库
Cassandra cassandra = 13; // Cassandra数据库
ClickHouse clickhouse = 20; // ClickHouse数据库
InfluxDB influxdb = 21; // InfluxDB数据库
Doris doris = 22; // Doris数据库
// Message Queue
Kafka kafka = 30; // Kafka服务
RabbitMQ rabbitmq = 31; // RabbitMQ服务
Mqtt mqtt = 32; // MQTT服务
ActiveMQ activemq = 33; // ActiveMQ
NATS nats = 34; // NATS
NSQ nsq = 35; // NATS
Pulsar pulsar = 36; // Pulsar
RocketMQ rocketmq = 38; // RocketMQ
}