1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-20 17:29:36 +01:00

refactor(libstore): add sizeHint parameter to upsertFile()

Add a sizeHint parameter to BinaryCacheStore::upsertFile() to enable
size-based upload decisions in implementations. This lays the groundwork
for reintroducing S3 multipart upload support.
This commit is contained in:
Bernardo Meurer Costa 2025-10-21 06:11:23 +00:00
parent 115dea10b2
commit 6b7223b6b7
No known key found for this signature in database
4 changed files with 25 additions and 7 deletions

View file

@ -56,7 +56,8 @@ protected:
void upsertFile(
const std::string & path,
std::shared_ptr<std::basic_iostream<char>> istream,
const std::string & mimeType) override
const std::string & mimeType,
uint64_t sizeHint) override
{
auto path2 = config->binaryCacheDir + "/" + path;
static std::atomic<int> counter{0};