diff options
author | Théophane Hufschmitt <theophane.hufschmitt@tweag.io> | 2022-06-08 14:03:46 +0200 |
---|---|---|
committer | Théophane Hufschmitt <theophane.hufschmitt@tweag.io> | 2022-06-08 14:03:46 +0200 |
commit | cb0553ecd0122f693653c1ac82beb26d127ce3cd (patch) | |
tree | e8962cbc8dfdfb2390b7e4b5c950c23f1ed7d07a /src/libstore/remote-store.cc | |
parent | 95f47c28fb8786f8d8d529192465bb6ec20db46b (diff) |
Restore the "low-latency" ssh copying
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r-- | src/libstore/remote-store.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index bc36aef5d..ad2e5c18a 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -674,6 +674,23 @@ void RemoteStore::addToStore(const ValidPathInfo & info, Source & source, void RemoteStore::addMultipleToStore( + PathsSource & pathsToCopy, + Activity & act, + RepairFlag repair, + CheckSigsFlag checkSigs) +{ + auto source = sinkToSource([&](Sink & sink) { + sink << pathsToCopy.size(); + for (auto & [pathInfo, pathSource] : pathsToCopy) { + pathInfo.write(sink, *this, 16); + pathSource->drainInto(sink); + } + }); + + addMultipleToStore(*source, repair, checkSigs); +} + +void RemoteStore::addMultipleToStore( Source & source, RepairFlag repair, CheckSigsFlag checkSigs) |