From f30727a67576cae4996cb187c0eae0f8eb1da58e Mon Sep 17 00:00:00 2001 From: Alex Crawford Date: Fri, 7 Aug 2015 10:52:59 -0700 Subject: [PATCH] config: update flags for etcd 2.1 --- config/etcd2.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/config/etcd2.go b/config/etcd2.go index fd3a432..efeb0e8 100644 --- a/config/etcd2.go +++ b/config/etcd2.go @@ -16,15 +16,18 @@ package config type Etcd2 struct { AdvertiseClientURLs string `yaml:"advertise_client_urls" env:"ETCD_ADVERTISE_CLIENT_URLS"` - CAFile string `yaml:"ca_file" env:"ETCD_CA_FILE"` + CAFile string `yaml:"ca_file" env:"ETCD_CA_FILE" deprecated:"ca_file obsoleted by trusted_ca_file and client_cert_auth"` CertFile string `yaml:"cert_file" env:"ETCD_CERT_FILE"` + ClientCertAuth bool `yaml:"client_cert_auth" env:"ETCD_CLIENT_CERT_AUTH"` CorsOrigins string `yaml:"cors" env:"ETCD_CORS"` DataDir string `yaml:"data_dir" env:"ETCD_DATA_DIR"` + Debug bool `yaml:"debug" env:"ETCD_DEBUG"` Discovery string `yaml:"discovery" env:"ETCD_DISCOVERY"` DiscoveryFallback string `yaml:"discovery_fallback" env:"ETCD_DISCOVERY_FALLBACK"` DiscoverySRV string `yaml:"discovery_srv" env:"ETCD_DISCOVERY_SRV"` DiscoveryProxy string `yaml:"discovery_proxy" env:"ETCD_DISCOVERY_PROXY"` ElectionTimeout int `yaml:"election_timeout" env:"ETCD_ELECTION_TIMEOUT"` + ForceNewCluster bool `yaml:"force_new_cluster" env:"ETCD_FORCE_NEW_CLUSTER"` HeartbeatInterval int `yaml:"heartbeat_interval" env:"ETCD_HEARTBEAT_INTERVAL"` InitialAdvertisePeerURLs string `yaml:"initial_advertise_peer_urls" env:"ETCD_INITIAL_ADVERTISE_PEER_URLS"` InitialCluster string `yaml:"initial_cluster" env:"ETCD_INITIAL_CLUSTER"` @@ -33,12 +36,21 @@ type Etcd2 struct { KeyFile string `yaml:"key_file" env:"ETCD_KEY_FILE"` ListenClientURLs string `yaml:"listen_client_urls" env:"ETCD_LISTEN_CLIENT_URLS"` ListenPeerURLs string `yaml:"listen_peer_urls" env:"ETCD_LISTEN_PEER_URLS"` + LogPackageLevels string `yaml:"log_package_levels" env:"ETCD_LOG_PACKAGE_LEVELS"` MaxSnapshots int `yaml:"max_snapshots" env:"ETCD_MAX_SNAPSHOTS"` MaxWALs int `yaml:"max_wals" env:"ETCD_MAX_WALS"` Name string `yaml:"name" env:"ETCD_NAME"` - PeerCAFile string `yaml:"peer_ca_file" env:"ETCD_PEER_CA_FILE"` + PeerCAFile string `yaml:"peer_ca_file" env:"ETCD_PEER_CA_FILE" deprecated:"peer_ca_file obsoleted peer_trusted_ca_file and peer_client_cert_auth"` PeerCertFile string `yaml:"peer_cert_file" env:"ETCD_PEER_CERT_FILE"` PeerKeyFile string `yaml:"peer_key_file" env:"ETCD_PEER_KEY_FILE"` - Proxy string `yaml:"proxy" env:"ETCD_PROXY" valid:"^(on|off|readonly)$"` - SnapshotCount int `yaml:"snapshot_count" env:"ETCD_SNAPSHOTCOUNT"` + PeerClientCertAuth bool `yaml:"peer_client_cert_auth" env:"ETCD_PEER_CLIENT_CERT_AUTH"` + PeerTrustedCAFile string `yaml:"peer_trusted_ca_file" env:"ETCD_PEER_TRUSTED_CA_FILE"` + Proxy string `yaml:"proxy" env:"ETCD_PROXY" valid:"^(on|off|readonly)$"` + ProxyDialTimeout int `yaml:"proxy_dial_timeout" env:"ETCD_PROXY_DIAL_TIMEOUT"` + ProxyFailureWait int `yaml:"proxy_failure_wait" env:"ETCD_PROXY_FAILURE_WAIT"` + ProxyReadTimeout int `yaml:"proxy_read_timeout" env:"ETCD_PROXY_READ_TIMEOUT"` + ProxyRefreshInterval int `yaml:"proxy_refresh_interval" env:"ETCD_PROXY_REFRESH_INTERVAL"` + ProxyWriteTimeout int `yaml:"proxy_write_timeout" env:"ETCD_PROXY_WRITE_TIMEOUT"` + SnapshotCount int `yaml:"snapshot_count" env:"ETCD_SNAPSHOT_COUNT"` + TrustedCAFile string `yaml:"trusted_ca_file" env:"ETCD_TRUSTED_CA_FILE"` }