9#define WORKER_MAGIC_1 0x6e697863
10#define WORKER_MAGIC_2 0x6478696f
16#define PROTOCOL_VERSION (1 << 8 | 35)
19#define MIN_SUPPORTED_MINOR_WORKER_PROTO_VERSION 21
20#define MIN_SUPPORTED_WORKER_PROTO_VERSION (1 << 8 | MIN_SUPPORTED_MINOR_WORKER_PROTO_VERSION)
22#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
23#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
26#define REMOVE_AFTER_DROPPING_PROTO_MINOR(protoMinor) \
27 static_assert(MIN_SUPPORTED_MINOR_WORKER_PROTO_VERSION <= (protoMinor))
30#define STDERR_NEXT 0x6f6c6d67
31#define STDERR_READ 0x64617461
32#define STDERR_WRITE 0x64617416
33#define STDERR_LAST 0x616c7473
34#define STDERR_ERROR 0x63787470
35#define STDERR_START_ACTIVITY 0x53545254
36#define STDERR_STOP_ACTIVITY 0x53544f50
37#define STDERR_RESULT 0x52534c54
49enum TrustedFlag : bool;
63 enum struct Op : uint64_t;
80 ReadConn(
Source & from,
Version version) : from(from), version(version) {
81 assert(version >= MIN_SUPPORTED_WORKER_PROTO_VERSION);
92 explicit WriteConn(
Version version) : version(version) {
93 assert(version >= MIN_SUPPORTED_WORKER_PROTO_VERSION);
140enum struct WorkerProto::Op : uint64_t
152 AddIndirectRoot = 12,
159 QuerySubstitutablePathInfo = 21,
160 QueryDerivationOutputs = 22,
161 QueryAllValidPaths = 23,
162 QueryFailedPaths = 24,
163 ClearFailedPaths = 25,
166 QueryDerivationOutputNames = 28,
167 QueryPathFromHashPart = 29,
168 QuerySubstitutablePathInfos = 30,
169 QueryValidPaths = 31,
170 QuerySubstitutablePaths = 32,
171 QueryValidDerivers = 33,
174 BuildDerivation = 36,
179 QueryDerivationOutputMap = 41,
180 RegisterDrvOutput = 42,
181 QueryRealisation = 43,
182 AddMultipleToStore = 44,
184 BuildPathsWithResults = 46,
193inline Sink & operator << (
Sink & sink, WorkerProto::Op op)
195 return sink << (uint64_t) op;
203inline std::ostream & operator << (std::ostream & s, WorkerProto::Op op)
205 return s << (uint64_t) op;
218#define DECLARE_WORKER_SERIALISER(T) \
219 struct WorkerProto::Serialise< T > \
221 static T read(const Store & store, WorkerProto::ReadConn conn); \
222 [[nodiscard]] static WireFormatGenerator write(const Store & store, WorkerProto::WriteConn conn, const T & t); \
242template<
typename... Ts>
246template<
typename K,
typename V>
Definition store-api.hh:195
Definition build-result.hh:17
Definition derived-path.hh:225
Definition build-result.hh:135
Definition serialise.hh:18
Definition serialise.hh:66
Definition path-info.hh:36
Definition path-info.hh:83
Definition worker-protocol.hh:76
Definition worker-protocol.hh:104
Definition worker-protocol.hh:89
Definition worker-protocol.hh:59
unsigned int Version
Definition worker-protocol.hh:70
static WireFormatGenerator write(const Store &store, WriteConn conn, const T &t)
Definition worker-protocol.hh:134
#define DECLARE_WORKER_SERIALISER(T)
Definition worker-protocol.hh:218