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 <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
Florian Klink 2023-10-03 14:40:58 +03:00 committed by flokli
parent 259269482c
commit b78b8d8338
2 changed files with 3 additions and 3 deletions

View file

@ -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)
},