code: func (s *Store) Snapshot() (raft.FSMSnapshot, error) {
  	s.mu.Lock()
  	defer s.mu.Unlock()
  
  	buf, err := json.Marshal(s.data)
  	if err != nil {
  		return nil, err
  	}
  	return &raftSnapshot{data: buf}, nil
  }
docs: // Snapshot implements raft.FSM.