code: func (ctl *Controller) RegisterFactory(id ID, m Factory) {
  	ctl.m.Lock()
  	defer ctl.m.Unlock()
  
  	if _, ok := ctl.mappers[id]; ok {
  		panic(fmt.Sprintf("mapper %q is already registered", id))
  	}
  
  	if ctl.mappers == nil {
  		ctl.mappers = make(map[ID]Factory, 1)
  	}
  	ctl.mappers[id] = m
  }
docs: // RegisterFactory adds the given mapper factory to the internal registry.
  //
  // Intended to be used during init() time or early during the process
  // initialization. Panics if a factory with such ID has already been registered.
  //
  // The mapper ID will be used internally to identify which mapper a job should
  // be using. If a factory disappears while the job is running (e.g. if the
  // service binary is updated and new binary doesn't have the mapper registered
  // anymore), the job ends with a failure.