Etcd leader election implementation for Node.js