refactor(main): remove Etcd.StopNotify() method

This commit is contained in:
Cenk Alti 2014-03-24 18:52:42 -07:00
parent c5632b039a
commit dfbabc5a77

View File

@ -46,7 +46,6 @@ type Etcd struct {
listener net.Listener // Listener for Server
peerListener net.Listener // Listener for PeerServer
readyC chan bool // To signal when server is ready to accept connections
stopC chan bool // To signal when etcd is stopped with Stop() method
}
// New returns a new Etcd instance.
@ -57,7 +56,6 @@ func New(c *config.Config) *Etcd {
return &Etcd{
Config: c,
readyC: make(chan bool),
stopC: make(chan bool),
}
}
@ -220,8 +218,6 @@ func (e *Etcd) Run() {
}
<-peerServerClosed
close(e.stopC) // etcd instance is stopped, notify waiters.
log.Infof("etcd instance is stopped [name %s]", e.Config.Name)
}
@ -231,10 +227,6 @@ func (e *Etcd) Stop() {
e.listener.Close()
}
func (e *Etcd) StopNotify() chan bool {
return e.stopC
}
func (e *Etcd) ReadyNotify() chan bool {
return e.readyC
}