code: func (s *Store) Close(wait bool) error {
  	s.closedMu.Lock()
  	defer s.closedMu.Unlock()
  	if s.closed {
  		return nil
  	}
  	defer func() {
  		s.closed = true
  	}()
  
  	close(s.done)
  	s.wg.Wait()
  
  	// XXX CLOSE OTHER CONNECTIONS
  	if err := s.dbConn.Close(); err != nil {
  		return err
  	}
  	s.dbConn = nil
  	s.db = nil
  
  	if s.raft != nil {
  		f := s.raft.Shutdown()
  		if wait {
  			if e := f.(raft.Future); e.Error() != nil {
  				return e.Error()
  			}
  		}
  		s.raft = nil
  	}
  
  	if s.boltStore != nil {
  		if err := s.boltStore.Close(); err != nil {
  			return err
  		}
  		s.boltStore = nil
  	}
  	s.raftLog = nil
  	s.raftStable = nil
  	return nil
  }
docs: // Close closes the store. If wait is true, waits for a graceful shutdown.
  // Once closed, a Store may not be re-opened.