code: func (r *EtcdRegistry) getAllUnitsHashMap() (map[string]*unit.UnitFile, error) {
  	key := r.prefixed(unitPrefix)
  	opts := &etcd.GetOptions{
  		Recursive: true,
  		Quorum:    true,
  	}
  	hashToUnit := map[string]*unit.UnitFile{}
  	start := time.Now()
  	resp, err := r.kAPI.Get(context.Background(), key, opts)
  	if err != nil {
  		metrics.ReportRegistryOpFailure(metrics.GetAll)
  		return nil, err
  	}
  	metrics.ReportRegistryOpSuccess(metrics.GetAll, start)
  
  	for _, node := range resp.Node.Nodes {
  		parts := strings.Split(node.Key, "/")
  		if len(parts) == 0 {
  			log.Errorf("key '%v' doesn't have enough parts", node.Key)
  			continue
  		}
  		stringHash := parts[len(parts)-1]
  		hash, err := unit.HashFromHexString(stringHash)
  		if err != nil {
  			log.Errorf("failed to get Hash for key '%v' with stringHash '%v': %v", node.Key, stringHash, err)
  			continue
  		}
  		unit := r.unitFromEtcdNode(hash, node)
  		if unit == nil {
  			continue
  		}
  		hashToUnit[stringHash] = unit
  	}
  
  	return hashToUnit, nil
  }
docs: // getAllUnitsHashMap retrieves from the Registry all Units and returns a map of hash to UnitFile