Table of Contents

Class EtcdCfgOptions

Namespace
Apq.Cfg.Etcd
Assembly
Apq.Cfg.Etcd.dll

Etcd 配置选项

public sealed class EtcdCfgOptions
Inheritance
EtcdCfgOptions
Inherited Members

Properties

CaCertPath

CA 证书路径(可选,用于 TLS)

public string? CaCertPath { get; set; }

Property Value

string

ClientCertPath

客户端证书路径(可选,用于 mTLS)

public string? ClientCertPath { get; set; }

Property Value

string

ClientKeyPath

客户端私钥路径(可选,用于 mTLS)

public string? ClientKeyPath { get; set; }

Property Value

string

ConnectTimeout

连接超时时间,默认 10 秒

public TimeSpan ConnectTimeout { get; set; }

Property Value

TimeSpan

DataFormat

配置数据格式,默认 KeyValue(每个 key 一个值)

public EtcdDataFormat DataFormat { get; set; }

Property Value

EtcdDataFormat

EnableHotReload

是否启用热重载,默认 true

public bool EnableHotReload { get; set; }

Property Value

bool

Endpoints

Etcd 服务端点列表,默认 ["localhost:2379"]

public string[] Endpoints { get; set; }

Property Value

string[]

KeyPrefix

KV 键前缀,默认 "/config/"

public string KeyPrefix { get; set; }

Property Value

string

Password

密码(可选)

public string? Password { get; set; }

Property Value

string

ReconnectInterval

重连间隔,默认 5 秒

public TimeSpan ReconnectInterval { get; set; }

Property Value

TimeSpan

SingleKey

当 DataFormat 为 Json 时,指定要读取的单个 key

public string? SingleKey { get; set; }

Property Value

string

Username

用户名(可选)

public string? Username { get; set; }

Property Value

string