consul: Adding method to force remove failed nodes

This commit is contained in:
Armon Dadgar 2013-12-10 14:42:29 -08:00
parent 29d0f901dc
commit 808e23bbd4
1 changed files with 11 additions and 0 deletions

View File

@ -337,3 +337,14 @@ func (s *Server) LANMembers() []serf.Member {
func (s *Server) WANMembers() []serf.Member { func (s *Server) WANMembers() []serf.Member {
return s.serfWAN.Members() return s.serfWAN.Members()
} }
// RemoveFailedNode is used to remove a failed node from the cluster
func (s *Server) RemoveFailedNode(node string) error {
if err := s.serfLAN.RemoveFailedNode(node); err != nil {
return err
}
if err := s.serfWAN.RemoveFailedNode(node); err != nil {
return err
}
return nil
}