refactor(tvix/nar-bridge): move DirectoriesUploader to pkg/importer

This is useful outside a HTTP server scenario.

Change-Id: I0042a6e773906a15a254d850520e6f841035bf20
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9533
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
Florian Klink 2023-10-03 14:42:59 +03:00 committed by flokli
parent b78b8d8338
commit 0353108e99
2 changed files with 2 additions and 2 deletions

View file

@ -1,4 +1,4 @@
package server
package importer
import (
"context"

View file

@ -36,7 +36,7 @@ func registerNarPut(s *Server) {
log := log.WithField("narhash_url", narHashFromUrl.SRIString())
directoriesUploader := NewDirectoriesUploader(ctx, s.directoryServiceClient)
directoriesUploader := importer.NewDirectoriesUploader(ctx, s.directoryServiceClient)
defer directoriesUploader.Done() //nolint:errcheck
pathInfo, err := importer.Import(