about summary refs log tree commit diff
path: root/tvix/nar-bridge
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-10-03T11·42+0300
committerflokli <flokli@flokli.de>2023-10-05T06·17+0000
commit0353108e99c6c2b7f15ea0c99a8ca4fd899d241a (patch)
tree8833a57d8017f350ae370323a3856aa84bd5cddb /tvix/nar-bridge
parentb78b8d83385a57cc58145662f2b96d97143eda7f (diff)
refactor(tvix/nar-bridge): move DirectoriesUploader to pkg/importer r/6699
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>
Diffstat (limited to 'tvix/nar-bridge')
-rw-r--r--tvix/nar-bridge/pkg/importer/directory_upload.go (renamed from tvix/nar-bridge/pkg/server/directory_upload.go)2
-rw-r--r--tvix/nar-bridge/pkg/server/nar_put.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/tvix/nar-bridge/pkg/server/directory_upload.go b/tvix/nar-bridge/pkg/importer/directory_upload.go
index ad04d2e389bb..5d5ca1f3899d 100644
--- a/tvix/nar-bridge/pkg/server/directory_upload.go
+++ b/tvix/nar-bridge/pkg/importer/directory_upload.go
@@ -1,4 +1,4 @@
-package server
+package importer
 
 import (
 	"context"
diff --git a/tvix/nar-bridge/pkg/server/nar_put.go b/tvix/nar-bridge/pkg/server/nar_put.go
index 5a56cba8810c..41cd257f722a 100644
--- a/tvix/nar-bridge/pkg/server/nar_put.go
+++ b/tvix/nar-bridge/pkg/server/nar_put.go
@@ -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(