code: func (h *haManager) requestFailover(peer bool) error {
  	state := h.state()
  	if state == seesaw.HAMaster {
  		h.failoverLock.Lock()
  		defer h.failoverLock.Unlock()
  		if h.failoverPending {
  			return fmt.Errorf("Failover request already pending")
  		}
  		h.failoverPending = true
  		return nil
  	}
  
  	if peer {
  		return fmt.Errorf("Node is not master (current state is %v)", state)
  	}
  
  	if err := h.engine.syncClient.failover(); err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // requestFailover requests the node to initiate a failover.