code: func (r *Router) AddArea(areaID types.AreaID, cluster RouterSerfCluster, pinger Pinger, useTLS bool) error {
  	r.Lock()
  	defer r.Unlock()
  
  	if r.isShutdown {
  		return fmt.Errorf("cannot add area, router is shut down")
  	}
  
  	if _, ok := r.areas[areaID]; ok {
  		return fmt.Errorf("area ID %q already exists", areaID)
  	}
  
  	area := &areaInfo{
  		cluster:  cluster,
  		pinger:   pinger,
  		managers: make(map[string]*managerInfo),
  		useTLS:   useTLS,
  	}
  	r.areas[areaID] = area
  
  	// Do an initial populate of the manager so that we don't have to wait
  	// for events to fire. This lets us attempt to use all the known servers
  	// initially, and then will quickly detect that they are failed if we
  	// can't reach them.
  	for _, m := range cluster.Members() {
  		ok, parts := metadata.IsConsulServer(m)
  		if !ok {
  			r.logger.Printf("[WARN]: consul: Non-server %q in server-only area %q",
  				m.Name, areaID)
  			continue
  		}
  
  		if err := r.addServer(area, parts); err != nil {
  			return fmt.Errorf("failed to add server %q to area %q: %v", m.Name, areaID, err)
  		}
  	}
  
  	return nil
  }
docs: // AddArea registers a new network area with the router.