Browse Source

Merge pull request #20 from ccding/dev

fix typos
polvi 12 years ago
parent
commit
961f62d548
4 changed files with 8 additions and 8 deletions
  1. 3 3
      client_handlers.go
  2. 2 2
      etcd.go
  3. 1 1
      transporter.go
  4. 2 2
      util.go

+ 3 - 3
client_handlers.go

@@ -28,7 +28,7 @@ func Multiplexer(w http.ResponseWriter, req *http.Request) {
 
 
 //--------------------------------------
 //--------------------------------------
 // State sensitive handlers
 // State sensitive handlers
-// Set/Delte will dispatch to leader
+// Set/Delete will dispatch to leader
 //--------------------------------------
 //--------------------------------------
 
 
 // Set Command Handler
 // Set Command Handler
@@ -193,9 +193,9 @@ func MachinesHttpHandler(w http.ResponseWriter, req *http.Request) {
 	// Since peer map does not contain the server itself
 	// Since peer map does not contain the server itself
 	machines, _ := getClientAddr(raftServer.Name())
 	machines, _ := getClientAddr(raftServer.Name())
 
 
-	// Add all peers to the list and sepearte by comma
+	// Add all peers to the list and separate by comma
 	// We do not use json here since we accept machines list
 	// We do not use json here since we accept machines list
-	// in the command line seperate by comma.
+	// in the command line separate by comma.
 
 
 	for peerName, _ := range peers {
 	for peerName, _ := range peers {
 		if addr, ok := getClientAddr(peerName); ok {
 		if addr, ok := getClientAddr(peerName); ok {

+ 2 - 2
etcd.go

@@ -165,7 +165,7 @@ func main() {
 
 
 	info = getInfo(dirPath)
 	info = getInfo(dirPath)
 
 
-	// secrity type
+	// security type
 	st := securityType(SERVER)
 	st := securityType(SERVER)
 
 
 	clientSt := securityType(CLIENT)
 	clientSt := securityType(CLIENT)
@@ -277,7 +277,7 @@ func startRaft(securityType int) {
 
 
 // Create transporter using by raft server
 // Create transporter using by raft server
 // Create http or https transporter based on
 // Create http or https transporter based on
-// wether the user give the server cert and key
+// whether the user give the server cert and key
 func createTransporter(st int) transporter {
 func createTransporter(st int) transporter {
 	t := transporter{}
 	t := transporter{}
 
 

+ 1 - 1
transporter.go

@@ -89,7 +89,7 @@ func (t transporter) SendSnapshotRequest(server *raft.Server, peer *raft.Peer, r
 	return aersp
 	return aersp
 }
 }
 
 
-// Get the the client address of the leader in the cluster
+// Get the client address of the leader in the cluster
 func (t transporter) GetLeaderClientAddress() string {
 func (t transporter) GetLeaderClientAddress() string {
 	resp, _ := t.Get(raftServer.Leader() + "/client")
 	resp, _ := t.Get(raftServer.Leader() + "/client")
 	if resp != nil {
 	if resp != nil {

+ 2 - 2
util.go

@@ -15,11 +15,11 @@ import (
 //--------------------------------------
 //--------------------------------------
 var storeMsg chan string
 var storeMsg chan string
 
 
-// Help to send msg from stroe to webHub
+// Help to send msg from store to webHub
 func webHelper() {
 func webHelper() {
 	storeMsg = make(chan string)
 	storeMsg = make(chan string)
 	for {
 	for {
-		// transfere the new msg to webHub
+		// transfer the new msg to webHub
 		web.Hub().Send(<-storeMsg)
 		web.Hub().Send(<-storeMsg)
 	}
 	}
 }
 }