Class ZookeeperCfgOptions
Zookeeper 配置选项
public sealed class ZookeeperCfgOptions
- Inheritance
-
ZookeeperCfgOptions
- Inherited Members
Properties
AuthInfo
认证信息(可选),如 "user:password"
public string? AuthInfo { get; set; }
Property Value
AuthScheme
认证方案(可选),如 "digest"
public string? AuthScheme { get; set; }
Property Value
ConnectTimeout
连接超时时间,默认 10 秒
public TimeSpan ConnectTimeout { get; set; }
Property Value
ConnectionString
Zookeeper 连接字符串,默认 localhost:2181 支持多节点:host1:2181,host2:2181,host3:2181
public string ConnectionString { get; set; }
Property Value
DataFormat
配置数据格式,默认 KeyValue(每个节点一个值)
public ZookeeperDataFormat DataFormat { get; set; }
Property Value
EnableHotReload
是否启用热重载,默认 true
public bool EnableHotReload { get; set; }
Property Value
ReconnectInterval
重连间隔,默认 5 秒
public TimeSpan ReconnectInterval { get; set; }
Property Value
RootPath
根路径,默认 "/config"
public string RootPath { get; set; }
Property Value
SessionTimeout
会话超时时间,默认 30 秒
public TimeSpan SessionTimeout { get; set; }
Property Value
SingleNode
当 DataFormat 为 Json 时,指定要读取的节点路径(相对于 RootPath)
public string? SingleNode { get; set; }