Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
worker-protocol-connection.hh
Go to the documentation of this file.
1#pragma once
3
6
7namespace nix {
8
10{
15
20
25
35 {
37 .from = from,
38 .version = protoVersion,
39 };
40 }
41
51 {
53 .to = to,
54 .version = protoVersion,
55 };
56 }
57};
58
60{
64 virtual ~BasicClientConnection();
65
66 virtual void closeWrite() = 0;
67
68 std::exception_ptr processStderrReturn(Sink * sink = 0, Source * source = 0, bool flush = true, bool block = true);
69
70 void
71 processStderr(bool * daemonException, Sink * sink = 0, Source * source = 0, bool flush = true, bool block = true);
72
88 // FIXME: this should probably be a constructor.
89 static Version handshake(BufferedSink & to, Source & from, const Version & localVersion);
90
96
97 void addTempRoot(const StoreDirConfig & remoteStore, bool * daemonException, const StorePath & path);
98
99 StorePathSet queryValidPaths(
100 const StoreDirConfig & remoteStore,
101 bool * daemonException,
102 const StorePathSet & paths,
103 SubstituteFlag maybeSubstitute);
104
105 std::optional<UnkeyedValidPathInfo>
106 queryPathInfo(const StoreDirConfig & store, bool * daemonException, const StorePath & path);
107
108 void putBuildDerivationRequest(
109 const StoreDirConfig & store,
110 bool * daemonException,
111 const StorePath & drvPath,
112 const BasicDerivation & drv,
113 BuildMode buildMode);
114
119 BuildResult getBuildDerivationResponse(const StoreDirConfig & store, bool * daemonException);
120
121 void narFromPath(
122 const StoreDirConfig & store, bool * daemonException, const StorePath & path, fun<void(Source &)> receiveNar);
123};
124
126{
142 // FIXME: this should probably be a constructor.
143 static Version handshake(BufferedSink & to, Source & from, const Version & localVersion);
144
149 void postHandshake(const StoreDirConfig & store, const ClientHandshakeInfo & info);
150};
151
152} // namespace nix
Definition serialise.hh:60
Definition path.hh:33
Definition fun.hh:19
Definition build-result.hh:123
Definition serialise.hh:194
Definition serialise.hh:246
Definition serialise.hh:18
Definition serialise.hh:95
Definition store-dir-config.hh:29
Definition worker-protocol-connection.hh:60
BuildResult getBuildDerivationResponse(const StoreDirConfig &store, bool *daemonException)
Definition worker-protocol-connection.cc:282
ClientHandshakeInfo postHandshake(const StoreDirConfig &store)
Definition worker-protocol-connection.cc:196
static Version handshake(BufferedSink &to, Source &from, const Version &localVersion)
Definition worker-protocol-connection.cc:138
Definition worker-protocol-connection.hh:10
WorkerProto::Version protoVersion
Definition worker-protocol-connection.hh:24
FdSink to
Definition worker-protocol-connection.hh:14
FdSource from
Definition worker-protocol-connection.hh:19
Definition worker-protocol-connection.hh:126
void postHandshake(const StoreDirConfig &store, const ClientHandshakeInfo &info)
Definition worker-protocol-connection.cc:214
static Version handshake(BufferedSink &to, Source &from, const Version &localVersion)
Definition worker-protocol-connection.cc:170
Definition worker-protocol.hh:288
Definition worker-protocol.hh:164
Definition worker-protocol.hh:70
Definition worker-protocol.hh:174