code: func NewSessionArchive(dataDir, serverID, namespace string, sessionID session.ID) (io.ReadCloser, error) {
  	index, err := readSessionIndex(
  		dataDir, []string{serverID}, namespace, sessionID)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  
  	// io.Pipe allows to generate the archive part by part
  	// without writing to disk or generating it in memory
  	// at the pace which reader is ready to consume it
  	reader, writer := io.Pipe()
  	tarball := tar.NewWriter(writer)
  	go func() {
  		if err := writeSessionArchive(index, tarball, writer); err != nil {
  			log.Warningf("Failed to write archive: %v.", trace.DebugReport(err))
  		}
  	}()
  
  	return reader, nil
  }
docs: // NewSessionArchive returns generated tar archive with all components