Browse Source

chore(main): add todo item and update comments

Cenk Alti 11 years ago
parent
commit
3eb74fc32c
1 changed files with 6 additions and 1 deletions
  1. 6 1
      etcd/etcd.go

+ 6 - 1
etcd/etcd.go

@@ -59,7 +59,7 @@ func New(c *config.Config) *Etcd {
 	}
 }
 
-// Run etcd.
+// Run the etcd instance.
 func (e *Etcd) Run() {
 	// Enable options.
 	if e.Config.VeryVeryVerbose {
@@ -221,12 +221,17 @@ func (e *Etcd) Run() {
 	log.Infof("etcd instance is stopped [name %s]", e.Config.Name)
 }
 
+// Stop the etcd instance.
+//
+// TODO Shutdown gracefully.
 func (e *Etcd) Stop() {
 	e.PeerServer.Stop()
 	e.peerListener.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 {
 	return e.readyC
 }