|
|
@@ -59,6 +59,8 @@ type Etcd struct {
|
|
|
}
|
|
|
|
|
|
// StartEtcd launches the etcd server and HTTP handlers for client/server communication.
|
|
|
+// The returned Etcd.Server is not guaranteed to have joined the cluster. Wait
|
|
|
+// on the Etcd.Server.ReadyNotify() channel to know when it completes and is ready for use.
|
|
|
func StartEtcd(inCfg *Config) (e *Etcd, err error) {
|
|
|
if err = inCfg.Validate(); err != nil {
|
|
|
return nil, err
|
|
|
@@ -130,7 +132,6 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) {
|
|
|
if err = e.serve(); err != nil {
|
|
|
return
|
|
|
}
|
|
|
- <-e.Server.ReadyNotify()
|
|
|
return
|
|
|
}
|
|
|
|