go-leaderelection (https://github.com/Comcast/go-leaderelection) provides the capability for a set of distributed processes to compete for leadership for a shared resource. It is implemented using Zookeeper for the underlying support. It provides a simple, asynchronous, interface. goroutines or processes can create an election, compete for becoming the leader for a resource, asynchronously wait to become a resource, resign leadership, and delete an election resource.