refactor(tvix/nar-bridge): let callbaks return calculated digests
This aligns behaviour more with how it should be - it's the responsibility of the callback functions to return digests of the things they consume(d). It allows further cleaning up the hasher struct. Change-Id: I9cbfc87e6abd4ff17fadf39eb6563ec3cb7fcc6f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9528 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
parent
b1ff1267be
commit
f92b0ef933
6 changed files with 109 additions and 100 deletions
|
|
@ -44,7 +44,7 @@ func registerNarPut(s *Server) {
|
|||
// buffer the body by 10MiB
|
||||
bufio.NewReaderSize(r.Body, 10*1024*1024),
|
||||
genBlobServiceWriteCb(ctx, s.blobServiceClient),
|
||||
func(directory *castorev1pb.Directory) error {
|
||||
func(directory *castorev1pb.Directory) ([]byte, error) {
|
||||
return directoriesUploader.Put(directory)
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue