fix typos

This commit is contained in:
Cong Ding
2013-07-16 01:04:41 +02:00
parent c9561cacf0
commit fd1d908e79
4 changed files with 8 additions and 8 deletions

View File

@ -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 {

View File

@ -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{}

View File

@ -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 {

View File

@ -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)
} }
} }