cleaner cluster messages

This commit is contained in:
Chris Lu
2014-02-09 23:37:29 -08:00
parent 67125688ed
commit ef4c2c0d1e
4 changed files with 25 additions and 4 deletions

View File

@@ -87,6 +87,10 @@ func NewRaftServer(r *mux.Router, version string, peers []string, httpAddr strin
return s
}
func (s *RaftServer) Name() string {
return s.raftServer.Name()
}
func (s *RaftServer) IsLeader() bool {
return s.Leader() == s.raftServer.Name()
}