Proxy promotion.

This commit is contained in:
Ben Johnson
2014-02-24 17:01:04 -07:00
parent 1d961b8e56
commit f5698d3566
12 changed files with 123 additions and 118 deletions

View File

@ -62,6 +62,11 @@ func (c *JoinCommand) Apply(context raft.Context) (interface{}, error) {
return buf.Bytes(), nil
}
// Remove it as a proxy if it is one.
if ps.registry.ProxyExists(c.Name) {
ps.registry.UnregisterProxy(c.Name)
}
// Add to shared peer registry.
ps.registry.RegisterPeer(c.Name, c.RaftURL, c.EtcdURL)