Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
remote-store-connection.hh
Go to the documentation of this file.
1#pragma once
3
7#include "nix/util/pool.hh"
9
10#include <utility>
11
12namespace nix {
13
22{
23private:
24 /* VTable anchor to avoid weak linkage of the vtable - it breaks
25 dynamic_cast across shared libraries on Darwin. */
26 virtual void anchor();
27
28public:
32 std::chrono::time_point<std::chrono::steady_clock> startTime;
33
42};
43
52{
54 bool daemonException = false;
55
56 ConnectionHandle(Pool<RemoteStore::Connection>::Handle && handle)
57 : handle(std::move(handle))
58 {
59 }
60
61 ConnectionHandle(ConnectionHandle && h) noexcept
62 : handle(std::move(h.handle))
63 {
64 }
65
66 ~ConnectionHandle();
67
68 RemoteStore::Connection & operator*()
69 {
70 return *handle;
71 }
72
73 RemoteStore::Connection * operator->()
74 {
75 return &*handle;
76 }
77
78 void processStderr(Sink * sink = 0, Source * source = 0, bool flush = true, bool block = true);
79
80 void withFramedSink(fun<void(Sink & sink)> sendData);
81};
82
83} // namespace nix
Definition lru-cache.hh:16
Definition pool.hh:106
Definition fun.hh:19
Definition remote-store-connection.hh:52
Definition remote-store-connection.hh:22
std::chrono::time_point< std::chrono::steady_clock > startTime
Definition remote-store-connection.hh:32
LRUCache< StorePath, std::monostate > tempRootsPinned
Definition remote-store-connection.hh:41
Definition serialise.hh:18
Definition serialise.hh:95
Definition worker-protocol-connection.hh:60
Definition worker-protocol.hh:288