code: func (h *haManager) failover() bool {
  	h.failoverLock.Lock()
  	pending := h.failoverPending
  	h.failoverPending = false
  	h.failoverLock.Unlock()
  	return pending
  }
docs: // failover returns true if the HA component should relinquish master state.