Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
remote-store-connection.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/store/remote-store.hh
"
5
#include "
nix/store/worker-protocol.hh
"
6
#include "
nix/store/worker-protocol-connection.hh
"
7
#include "
nix/util/pool.hh
"
8
#include "
nix/util/lru-cache.hh
"
9
10
#include <utility>
11
12
namespace
nix {
13
21
struct
RemoteStore::Connection
:
WorkerProto::BasicClientConnection
,
WorkerProto::ClientHandshakeInfo
22
{
23
private
:
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
28
public
:
32
std::chrono::time_point<std::chrono::steady_clock>
startTime
;
33
41
LRUCache<StorePath, std::monostate>
tempRootsPinned
{65536};
42
};
43
51
struct
RemoteStore::ConnectionHandle
52
{
53
Pool<RemoteStore::Connection>::Handle
handle;
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
nix::LRUCache
Definition
lru-cache.hh:16
nix::Pool::Handle
Definition
pool.hh:106
nix::fun
Definition
fun.hh:19
lru-cache.hh
pool.hh
remote-store.hh
nix::RemoteStore::ConnectionHandle
Definition
remote-store-connection.hh:52
nix::RemoteStore::Connection
Definition
remote-store-connection.hh:22
nix::RemoteStore::Connection::startTime
std::chrono::time_point< std::chrono::steady_clock > startTime
Definition
remote-store-connection.hh:32
nix::RemoteStore::Connection::tempRootsPinned
LRUCache< StorePath, std::monostate > tempRootsPinned
Definition
remote-store-connection.hh:41
nix::Sink
Definition
serialise.hh:18
nix::Source
Definition
serialise.hh:95
nix::WorkerProto::BasicClientConnection
Definition
worker-protocol-connection.hh:60
nix::WorkerProto::ClientHandshakeInfo
Definition
worker-protocol.hh:288
worker-protocol-connection.hh
worker-protocol.hh
libstore
include
nix
store
remote-store-connection.hh
Generated by
1.18.0