|
@@ -40,7 +40,8 @@ const (
|
|
|
clusterStateFlagNew = "new"
|
|
clusterStateFlagNew = "new"
|
|
|
clusterStateFlagExisting = "existing"
|
|
clusterStateFlagExisting = "existing"
|
|
|
|
|
|
|
|
- defaultName = "default"
|
|
|
|
|
|
|
+ defaultName = "default"
|
|
|
|
|
+ defaultInitialAdvertisePeerURLs = "http://localhost:2380,http://localhost:7001"
|
|
|
|
|
|
|
|
// maxElectionMs specifies the maximum value of election timeout.
|
|
// maxElectionMs specifies the maximum value of election timeout.
|
|
|
// More details are listed in ../Documentation/tuning.md#time-parameters.
|
|
// More details are listed in ../Documentation/tuning.md#time-parameters.
|
|
@@ -162,7 +163,7 @@ func NewConfig() *config {
|
|
|
fs.UintVar(&cfg.ElectionMs, "election-timeout", 1000, "Time (in milliseconds) for an election to timeout.")
|
|
fs.UintVar(&cfg.ElectionMs, "election-timeout", 1000, "Time (in milliseconds) for an election to timeout.")
|
|
|
|
|
|
|
|
// clustering
|
|
// clustering
|
|
|
- fs.Var(flags.NewURLsValue("http://localhost:2380,http://localhost:7001"), "initial-advertise-peer-urls", "List of this member's peer URLs to advertise to the rest of the cluster")
|
|
|
|
|
|
|
+ fs.Var(flags.NewURLsValue(defaultInitialAdvertisePeerURLs), "initial-advertise-peer-urls", "List of this member's peer URLs to advertise to the rest of the cluster")
|
|
|
fs.Var(flags.NewURLsValue("http://localhost:2379,http://localhost:4001"), "advertise-client-urls", "List of this member's client URLs to advertise to the rest of the cluster")
|
|
fs.Var(flags.NewURLsValue("http://localhost:2379,http://localhost:4001"), "advertise-client-urls", "List of this member's client URLs to advertise to the rest of the cluster")
|
|
|
fs.StringVar(&cfg.durl, "discovery", "", "Discovery service used to bootstrap the initial cluster")
|
|
fs.StringVar(&cfg.durl, "discovery", "", "Discovery service used to bootstrap the initial cluster")
|
|
|
fs.Var(cfg.fallback, "discovery-fallback", fmt.Sprintf("Valid values include %s", strings.Join(cfg.fallback.Values, ", ")))
|
|
fs.Var(cfg.fallback, "discovery-fallback", fmt.Sprintf("Valid values include %s", strings.Join(cfg.fallback.Values, ", ")))
|