code: func (m *Manager) AddServer(s *metadata.Server) {
  	m.listLock.Lock()
  	defer m.listLock.Unlock()
  	l := m.getServerList()
  
  	// Check if this server is known
  	found := false
  	for idx, existing := range l.servers {
  		if existing.Name == s.Name {
  			newServers := make([]*metadata.Server, len(l.servers))
  			copy(newServers, l.servers)
  
  			// Overwrite the existing server details in order to
  			// possibly update metadata (e.g. server version)
  			newServers[idx] = s
  
  			l.servers = newServers
  			found = true
  			break
  		}
  	}
  
  	// Add to the list if not known
  	if !found {
  		newServers := make([]*metadata.Server, len(l.servers), len(l.servers)+1)
  		copy(newServers, l.servers)
  		newServers = append(newServers, s)
  		l.servers = newServers
  	}
  
  	// Assume we are no longer offline since we've just seen a new server.
  	atomic.StoreInt32(&m.offline, 0)
  
  	// Start using this list of servers.
  	m.saveServerList(l)
  }
docs: // AddServer takes out an internal write lock and adds a new server.  If the
  // server is not known, appends the server to the list.  The new server will
  // begin seeing use after the rebalance timer fires or enough servers fail
  // organically.  If the server is already known, merge the new server
  // details.