code: func (s *Store) Services(ws memdb.WatchSet) (uint64, structs.Services, error) {
  	tx := s.db.Txn(false)
  	defer tx.Abort()
  
  	// Get the table index.
  	idx := maxIndexTxn(tx, "services")
  
  	// List all the services.
  	services, err := tx.Get("services", "id")
  	if err != nil {
  		return 0, nil, fmt.Errorf("failed querying services: %s", err)
  	}
  	ws.Add(services.WatchCh())
  
  	// Rip through the services and enumerate them and their unique set of
  	// tags.
  	unique := make(map[string]map[string]struct{})
  	for service := services.Next(); service != nil; service = services.Next() {
  		svc := service.(*structs.ServiceNode)
  		tags, ok := unique[svc.ServiceName]
  		if !ok {
  			unique[svc.ServiceName] = make(map[string]struct{})
  			tags = unique[svc.ServiceName]
  		}
  		for _, tag := range svc.ServiceTags {
  			tags[tag] = struct{}{}
  		}
  	}
  
  	// Generate the output structure.
  	var results = make(structs.Services)
  	for service, tags := range unique {
  		results[service] = make([]string, 0)
  		for tag := range tags {
  			results[service] = append(results[service], tag)
  		}
  	}
  	return idx, results, nil
  }
docs: // Services returns all services along with a list of associated tags.