RemoveAll removes all pool entries.
()
| 93 | |
| 94 | // RemoveAll removes all pool entries. |
| 95 | func (p *Pools) RemoveAll() { |
| 96 | p.Lock() |
| 97 | defer p.Unlock() |
| 98 | |
| 99 | for k, pool := range p.all { |
| 100 | glog.Warningf("CONN: Disconnecting from %s\n", k) |
| 101 | delete(p.all, k) |
| 102 | pool.shutdown() |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | // RemoveInvalid removes invalid nodes from the list of pools. |
| 107 | func (p *Pools) RemoveInvalid(state *pb.MembershipState) { |