From b78b8d83385a57cc58145662f2b96d97143eda7f Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 3 Oct 2023 14:40:58 +0300 Subject: refactor(tvix/nar-bridge): move blob cb function to pkg/importer This is useful outside a HTTP server scenario. Change-Id: If35f1ab245855378fd01f16ad7b5774d0cf590ba Reviewed-on: https://cl.tvl.fyi/c/depot/+/9532 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster Autosubmit: flokli --- tvix/nar-bridge/pkg/server/nar_put.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/nar-bridge/pkg/server/nar_put.go') diff --git a/tvix/nar-bridge/pkg/server/nar_put.go b/tvix/nar-bridge/pkg/server/nar_put.go index d8c77c146462..5a56cba8810c 100644 --- a/tvix/nar-bridge/pkg/server/nar_put.go +++ b/tvix/nar-bridge/pkg/server/nar_put.go @@ -43,7 +43,7 @@ func registerNarPut(s *Server) { ctx, // buffer the body by 10MiB bufio.NewReaderSize(r.Body, 10*1024*1024), - genBlobServiceWriteCb(ctx, s.blobServiceClient), + importer.GenBlobUploaderCb(ctx, s.blobServiceClient), func(directory *castorev1pb.Directory) ([]byte, error) { return directoriesUploader.Put(directory) }, -- cgit 1.4.1