code: func (h *healthcheckManager) buildMaps() {
  	allChecks := make(map[checkKey]*check)
  	for _, vchecks := range h.vserverChecks {
  		for k, c := range vchecks {
  			if allChecks[k] == nil {
  				allChecks[k] = c
  			} else {
  				log.Warningf("Duplicate key: %v", k)
  			}
  		}
  	}
  
  	h.lock.RLock()
  	ids := h.ids
  	cfgs := h.cfgs
  	checks := h.checks
  	h.lock.RUnlock()
  	newIDs := make(map[checkKey]healthcheck.Id)
  	newCfgs := make(map[healthcheck.Id]*healthcheck.Config)
  	newChecks := make(map[healthcheck.Id]*check)
  
  	for key, c := range allChecks {
  		id, ok := ids[key]
  		if !ok {
  			id = h.next
  			h.next++
  		}
  
  		// Create a new healthcheck configuration if one did not
  		// previously exist, or if the check configuration changed.
  		cfg, ok := cfgs[id]
  		if !ok || *checks[id].healthcheck != *c.healthcheck {
  			newCfg, err := h.newConfig(id, key, c.healthcheck)
  			if err != nil {
  				log.Error(err)
  				continue
  			}
  			cfg = newCfg
  		}
  
  		newIDs[key] = id
  		newCfgs[id] = cfg
  		newChecks[id] = c
  	}
  
  	h.lock.Lock()
  	h.ids = newIDs
  	h.cfgs = newCfgs
  	h.checks = newChecks
  	h.lock.Unlock()
  
  	h.pruneMarks()
  }
docs: // buildMaps builds the cfgs, checks, and ids maps based on the vserverChecks.