leader_watcher: created a base leader watcher to elect the master node