code: func NewLeaderElectionService(adapter LeaderElectionAdapter, id string, callback leadershipCallback, config ElectionConfig) LeaderElectionService {
  	if len(id) == 0 {
  		panic("Empty id")
  	}
  	le := &leaderElectionSvcImpl{
  		id:            peerID(id),
  		proposals:     util.NewSet(),
  		adapter:       adapter,
  		stopChan:      make(chan struct{}, 1),
  		interruptChan: make(chan struct{}, 1),
  		logger:        util.GetLogger(util.ElectionLogger, ""),
  		callback:      noopCallback,
  		config:        config,
  	}
  
  	if callback != nil {
  		le.callback = callback
  	}
  
  	go le.start()
  	return le
  }
docs: // NewLeaderElectionService returns a new LeaderElectionService