go flavour

release-0.4
Fabrizio (Misto) Milo 2013-08-14 17:58:00 -07:00 committed by Brandon Philips
parent 981351c9d9
commit c459b4bda7
3 changed files with 6 additions and 6 deletions

View File

@ -197,7 +197,7 @@ func main() {
r = newRaftServer(info.Name, info.RaftURL, &raftTLSConfig, &info.RaftTLS)
startWebInterface()
r.run()
e.run()
r.ListenAndServe()
e.ListenAndServe()
}

View File

@ -36,13 +36,13 @@ func newEtcdServer(name string, urlStr string, tlsConf *TLSConfig, tlsInfo *TLSI
}
// Start to listen and response etcd client command
func (e *etcdServer) run() {
func (e *etcdServer) ListenAndServe() {
infof("etcd server [%s:%s]", e.name, e.url)
if e.tlsConf.Scheme == "http" {
fatal(e.ListenAndServe())
fatal(e.Server.ListenAndServe())
} else {
fatal(e.ListenAndServeTLS(e.tlsInfo.CertFile, e.tlsInfo.KeyFile))
fatal(e.Server.ListenAndServeTLS(e.tlsInfo.CertFile, e.tlsInfo.KeyFile))
}
}

View File

@ -42,7 +42,7 @@ func newRaftServer(name string, url string, tlsConf *TLSConfig, tlsInfo *TLSInfo
}
// Start the raft server
func (r *raftServer) run() {
func (r *raftServer) ListenAndServe() {
// Setup commands.
registerCommands()