code: func (s *HTTPServer) UIServices(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
  	// Parse arguments
  	args := structs.DCSpecificRequest{}
  	if done := s.parse(resp, req, &args.Datacenter, &args.QueryOptions); done {
  		return nil, nil
  	}
  
  	s.parseFilter(req, &args.Filter)
  
  	// Make the RPC request
  	var out structs.IndexedCheckServiceNodes
  	defer setMeta(resp, &out.QueryMeta)
  RPC:
  	if err := s.agent.RPC("Internal.ServiceDump", &args, &out); err != nil {
  		// Retry the request allowing stale data if no leader
  		if strings.Contains(err.Error(), structs.ErrNoLeader.Error()) && !args.AllowStale {
  			args.AllowStale = true
  			goto RPC
  		}
  		return nil, err
  	}
  
  	// Generate the summary
  	return summarizeServices(out.Nodes), nil
  }
docs: // UIServices is used to list the services in a given datacenter. We return a
  // ServiceSummary which provides overview information for the service