Class EtcdCfgOptions
Etcd 配置选项
public sealed class EtcdCfgOptions
- Inheritance
-
EtcdCfgOptions
- Inherited Members
Properties
CaCertPath
CA 证书路径(可选,用于 TLS)
public string? CaCertPath { get; set; }
Property Value
ClientCertPath
客户端证书路径(可选,用于 mTLS)
public string? ClientCertPath { get; set; }
Property Value
ClientKeyPath
客户端私钥路径(可选,用于 mTLS)
public string? ClientKeyPath { get; set; }
Property Value
ConnectTimeout
连接超时时间,默认 10 秒
public TimeSpan ConnectTimeout { get; set; }
Property Value
DataFormat
配置数据格式,默认 KeyValue(每个 key 一个值)
public EtcdDataFormat DataFormat { get; set; }
Property Value
EnableHotReload
是否启用热重载,默认 true
public bool EnableHotReload { get; set; }
Property Value
Endpoints
Etcd 服务端点列表,默认 ["localhost:2379"]
public string[] Endpoints { get; set; }
Property Value
- string[]
KeyPrefix
KV 键前缀,默认 "/config/"
public string KeyPrefix { get; set; }
Property Value
Password
密码(可选)
public string? Password { get; set; }
Property Value
ReconnectInterval
重连间隔,默认 5 秒
public TimeSpan ReconnectInterval { get; set; }
Property Value
SingleKey
当 DataFormat 为 Json 时,指定要读取的单个 key
public string? SingleKey { get; set; }
Property Value
Username
用户名(可选)
public string? Username { get; set; }