mirror of
https://github.com/NixOS/nix.git
synced 2025-12-03 15:40:59 +01:00
Create worker_proto::{Read,Write}Conn
Pass this around instead of `Source &` and `Sink &` directly. This will give us something to put the protocol version on once the time comes. To do this ergonomically, we need to expose `RemoteStore::Connection`, so do that too. Give it some more API docs while we are at it.
This commit is contained in:
parent
4e8b495ad7
commit
9f69b7dee9
16 changed files with 348 additions and 184 deletions
|
|
@ -1151,9 +1151,11 @@ HookReply DerivationGoal::tryBuildHook()
|
|||
throw;
|
||||
}
|
||||
|
||||
WorkerProto::WriteConn conn { hook->sink };
|
||||
|
||||
/* Tell the hook all the inputs that have to be copied to the
|
||||
remote system. */
|
||||
WorkerProto::write(worker.store, hook->sink, inputPaths);
|
||||
WorkerProto::write(worker.store, conn, inputPaths);
|
||||
|
||||
/* Tell the hooks the missing outputs that have to be copied back
|
||||
from the remote system. */
|
||||
|
|
@ -1164,7 +1166,7 @@ HookReply DerivationGoal::tryBuildHook()
|
|||
if (buildMode != bmCheck && status.known && status.known->isValid()) continue;
|
||||
missingOutputs.insert(outputName);
|
||||
}
|
||||
WorkerProto::write(worker.store, hook->sink, missingOutputs);
|
||||
WorkerProto::write(worker.store, conn, missingOutputs);
|
||||
}
|
||||
|
||||
hook->sink = FdSink();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue