code: func (configMgr *ConfigurationManager) AddSource(source core.ConfigSource, priority int) error {
  	if source == nil || source.GetSourceName() == "" {
  		err := errors.New("nil or invalid source supplied")
  		openlogging.GetLogger().Error("nil or invalid source supplied: " + err.Error())
  		return err
  	}
  
  	configMgr.sourceMapMux.Lock()
  	sourceName := source.GetSourceName()
  
  	_, ok := configMgr.Sources[sourceName]
  	if ok {
  		err := errors.New("duplicate source supplied")
  		openlogging.GetLogger().Error("duplicate source supplied: " + err.Error())
  		configMgr.sourceMapMux.Unlock()
  		return err
  	}
  
  	configMgr.Sources[sourceName] = source
  	configMgr.sourceMapMux.Unlock()
  
  	err := configMgr.pullSourceConfigs(sourceName)
  	if err != nil {
  		err = fmt.Errorf("fail to load configuration of %s source: %s", sourceName, err)
  		openlogging.Error(err.Error())
  		return err
  	}
  	openlogging.Info("invoke dynamic handler:" + source.GetSourceName())
  	go source.DynamicConfigHandler(configMgr)
  
  	return nil
  }
docs: // AddSource adds a source to configurationManager