code: func (s *Server) revokeLeadership() error {
  	// Disable the tombstone GC, since it is only useful as a leader
  	s.tombstoneGC.SetEnabled(false)
  
  	// Clear the session timers on either shutdown or step down, since we
  	// are no longer responsible for session expirations.
  	if err := s.clearAllSessionTimers(); err != nil {
  		return err
  	}
  
  	s.stopConfigReplication()
  
  	s.stopEnterpriseLeader()
  
  	s.stopCARootPruning()
  
  	s.setCAProvider(nil, nil)
  
  	s.stopACLTokenReaping()
  
  	s.stopACLUpgrade()
  
  	s.resetConsistentReadReady()
  	s.autopilot.Stop()
  	return nil
  }
docs: // revokeLeadership is invoked once we step down as leader.
  // This is used to cleanup any state that may be specific to a leader.