Files
kratos-bootstrap/api/protos/conf/v1/kratos_conf_registry.proto
2025-06-02 10:33:44 +08:00

100 lines
2.7 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 Registry {
// Consul
message Consul {
string scheme = 1; // 网络样式
string address = 2; // 服务端地址
bool health_check = 3; // 健康检查
}
// Etcd
message Etcd {
repeated string endpoints = 1;
}
// ZooKeeper
message ZooKeeper {
repeated string endpoints = 1;
google.protobuf.Duration timeout = 2;
}
// Nacos
message Nacos {
string address = 1; // 服务端地址
uint64 port = 2; // 服务端端口
string namespace_id = 3; // 命名空间ID
string region_id = 4; // 区域ID
string app_name = 5; // 应用名称
string access_key = 6; // 访问密钥
string secret_key = 7; // 密钥
string username = 8; // 用户名
string password = 9; // 密码
string log_level = 10; // 日志等级
string log_dir = 11; // 日志目录
string cache_dir = 12; // 缓存目录
string context_path = 13; // 上下文路径
google.protobuf.Duration timeout = 20; // http请求超时时间单位: 毫秒
google.protobuf.Duration beat_interval = 21; // 心跳间隔时间,单位: 毫秒
google.protobuf.Duration listen_interval = 22; // 心跳间隔时间,单位: 毫秒
int32 update_thread_num = 30; // 更新服务的线程数
bool not_load_cache_at_start = 40; // 在启动时不读取本地缓存数据true: 不读取false: 读取
bool update_cache_when_empty = 41; // 当服务列表为空时是否更新本地缓存true: 更新,false: 不更新
bool open_kms = 42; // 是否开启kms加密true: 开启false: 关闭
}
// Kubernetes
message Kubernetes {
}
// Eureka
message Eureka {
repeated string endpoints = 1;
google.protobuf.Duration heartbeat_interval = 2;
google.protobuf.Duration refresh_interval = 3;
string path = 4;
}
// Polaris
message Polaris {
string address = 1; // 服务端地址
int32 port = 2; // 服务端端口
int32 instance_count = 3;
string namespace = 4;
string service = 5;
string token = 6;
}
// Servicecomb
message Servicecomb {
repeated string endpoints = 1;
}
string type = 1;
optional Consul consul = 2; // Consul
optional Etcd etcd = 3; // Etcd
optional ZooKeeper zookeeper = 4; // ZooKeeper
optional Nacos nacos = 5; // Nacos
optional Kubernetes kubernetes = 6; // Kubernetes
optional Eureka eureka = 7; // Eureka
optional Polaris polaris = 8; // Polaris
optional Servicecomb servicecomb = 9; // Servicecomb
}