chore(main): add todo item and update comments

This commit is contained in:
Cenk Alti 2014-03-24 22:47:54 -07:00
parent a9e77c022c
commit 3eb74fc32c

View File

@ -59,7 +59,7 @@ func New(c *config.Config) *Etcd {
} }
} }
// Run etcd. // Run the etcd instance.
func (e *Etcd) Run() { func (e *Etcd) Run() {
// Enable options. // Enable options.
if e.Config.VeryVeryVerbose { if e.Config.VeryVeryVerbose {
@ -221,12 +221,17 @@ func (e *Etcd) Run() {
log.Infof("etcd instance is stopped [name %s]", e.Config.Name) log.Infof("etcd instance is stopped [name %s]", e.Config.Name)
} }
// Stop the etcd instance.
//
// TODO Shutdown gracefully.
func (e *Etcd) Stop() { func (e *Etcd) Stop() {
e.PeerServer.Stop() e.PeerServer.Stop()
e.peerListener.Close() e.peerListener.Close()
e.listener.Close() e.listener.Close()
} }
// ReadyNotify returns a channel that is going to be closed
// when the etcd instance is ready to accept connections.
func (e *Etcd) ReadyNotify() chan bool { func (e *Etcd) ReadyNotify() chan bool {
return e.readyC return e.readyC
} }