embed: move "unsafe" flags to bottom

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee 2018-03-23 05:24:20 -07:00
parent 940200f1ae
commit cfd8b3e86d
2 changed files with 4 additions and 4 deletions

View File

@ -205,9 +205,6 @@ type Config struct {
ListenMetricsUrls []url.URL
ListenMetricsUrlsJSON string `json:"listen-metrics-urls"`
// ForceNewCluster starts a new cluster even if previously started; unsafe.
ForceNewCluster bool `json:"force-new-cluster"`
// UserHandlers is for registering users handlers and only used for
// embedding etcd into other applications.
// The map key is the route path for the handler, and
@ -227,6 +224,9 @@ type Config struct {
ExperimentalInitialCorruptCheck bool `json:"experimental-initial-corrupt-check"`
ExperimentalCorruptCheckTime time.Duration `json:"experimental-corrupt-check-time"`
ExperimentalEnableV2V3 string `json:"experimental-enable-v2v3"`
// ForceNewCluster starts a new cluster even if previously started; unsafe.
ForceNewCluster bool `json:"force-new-cluster"`
}
// configYAML holds the config suitable for yaml parsing

View File

@ -157,7 +157,6 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) {
DiscoveryURL: cfg.Durl,
DiscoveryProxy: cfg.Dproxy,
NewCluster: cfg.IsNewCluster(),
ForceNewCluster: cfg.ForceNewCluster,
PeerTLSInfo: cfg.PeerTLSInfo,
TickMs: cfg.TickMs,
ElectionTicks: cfg.ElectionTicks(),
@ -173,6 +172,7 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) {
CorruptCheckTime: cfg.ExperimentalCorruptCheckTime,
PreVote: cfg.PreVote,
Debug: cfg.Debug,
ForceNewCluster: cfg.ForceNewCluster,
}
srvcfg.HostWhitelist = make(map[string]struct{}, len(cfg.HostWhitelist))