code: func (s *Server) globalRPC(method string, args interface{},
  	reply structs.CompoundResponse) error {
  
  	// Make a new request into each datacenter
  	dcs := s.router.GetDatacenters()
  
  	replies, total := 0, len(dcs)
  	errorCh := make(chan error, total)
  	respCh := make(chan interface{}, total)
  
  	for _, dc := range dcs {
  		go func(dc string) {
  			rr := reply.New()
  			if err := s.forwardDC(method, dc, args, &rr); err != nil {
  				errorCh <- err
  				return
  			}
  			respCh <- rr
  		}(dc)
  	}
  
  	for replies < total {
  		select {
  		case err := <-errorCh:
  			return err
  		case rr := <-respCh:
  			reply.Add(rr)
  			replies++
  		}
  	}
  	return nil
  }
docs: // globalRPC is used to forward an RPC request to one server in each datacenter.
  // This will only error for RPC-related errors. Otherwise, application-level
  // errors can be sent in the response objects.