This commit is contained in:
Xiang Li 2013-07-09 17:31:24 -07:00
parent a3173bfd31
commit 5271da3d19
4 changed files with 17 additions and 19 deletions

View File

@ -147,7 +147,6 @@ func main() {
fatal("Please specify cert and key file or cert and key file and CAFile or none of the three") fatal("Please specify cert and key file or cert and key file and CAFile or none of the three")
} }
// Create transporter for raft // Create transporter for raft
raftTransporter = createTransporter(st) raftTransporter = createTransporter(st)

View File

@ -1,10 +1,10 @@
package main package main
import ( import (
"net/http"
"strconv"
"encoding/json" "encoding/json"
"github.com/coreos/go-raft" "github.com/coreos/go-raft"
"net/http"
"strconv"
) )
//------------------------------------------------------------- //-------------------------------------------------------------
@ -19,7 +19,6 @@ func GetLogHttpHandler(w http.ResponseWriter, req *http.Request) {
json.NewEncoder(w).Encode(raftServer.LogEntries()) json.NewEncoder(w).Encode(raftServer.LogEntries())
} }
// Response to vote request // Response to vote request
func VoteHttpHandler(w http.ResponseWriter, req *http.Request) { func VoteHttpHandler(w http.ResponseWriter, req *http.Request) {
rvreq := &raft.RequestVoteRequest{} rvreq := &raft.RequestVoteRequest{}